Commands | How it works? |
---|---|
git add | Add files on stagging to prepare for the next commit |
git status log | View the status of your changes |
git commit | Record changes to the repo and given log message describing the changes |
git push | Update remote repo with their local changes |
git pull | To download information from the remote repo to the local repo |
git fetch | Update refs |
git branch/checkout | List, create, delete and switch branches |
git mv/rm | Move, rename or remove files from the working tree and from the index |
git merge | Merge between remote or local branches |
git rebase | Reapply commits on top of another base tip |
git revert | Revert some existing commits |
git reset | Reset current HEAD to the specified state |
others | More useful git commands |
- Inofensive: Doesn't make any change at your project only give to you information about it.
- Warning: Pay attention on those commands, because they may be executed with your all attention on what they will do at you git structure.
- Danger: Those commands could change the file structure of your project and it can cause files or folders deletion.
git log --pretty=oneline
- shows the history of commits in a single per commit with the full hash.