[github] Usages

working with different files

working with branches

*check the current branchgit

```git branch``` will show all the branches of the current repo;
the starred one is the branch you are on
  • pull from another branchurl

    git pull is the shorthand for git pull <remote> <branch>, default git pull origin mastercode

    use git remote -v for the remotes;rem

    use git remote add <remote name> <url> for setting new remote addressget

  • merge another branchhash

  • creating new branchesit

working with commits

  • check commits
git log # check previous commit
  • revert the previous commit
git revert <unwanted previous commit hash>
  • check some history version of the code
git checkout <test commit hash> # checkout (not "pull" !) a history version of the code
相關文章
相關標籤/搜索