[github] Usages
working with different files
- "Remove a file from a Git repository without deleting it from the local filesystem" https://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste
working with branches
*check the current branch
```git branch``` will show all the branches of the current repo;
the starred one is the branch you are on
-
pull from another branch
git pull is the shorthand for
git pull <remote> <branch>
, defaultgit pull origin master
use
git remote -v
for the remotes;use
git remote add <remote name> <url>
for setting new remote address -
merge another branch
-
creating new branches
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