Git Tips and Tricks

2019-09-29  本文已影响0人  ELVENITO

未经许可请勿转载。
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
上一篇 下一篇

猜你喜欢

热点阅读