Skip to content

Latest commit

 

History

History
176 lines (145 loc) · 9.99 KB

README.eng.md

File metadata and controls

176 lines (145 loc) · 9.99 KB

📓 GIT COMMANDS

Summary

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

Danger levels of 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.

Other concepts:

git add - Add files on stagging to prepare for the next commit

git status/log - View the status of your changes

git log --pretty=oneline - shows the history of commits in a single per commit with the full hash.

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