Git Tips and Tricks

未经许可请勿转载。
Please do not reprint this article without permission.

Useful Docs

Common Usage

git status
git log
git init # create local repository
git remote add origin {remote-repository-url}.git # operations on remote repository
git pull # pull from remote repository
git add -A # git add /path/to/a/specific/file
git commit -m "Commit message."
git push -u origin master # push to the master branch of remote repository
git branch {new-branch-name} # create a new branch
git checkout {branch-name} # switch to another branch
git merge {another-branch} # merge another branch
git rm -r --cached {file-to-ignore} # untrack file to ignore
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容