Friday, March 31, 2017

Tips: Some common Git commands

- git status

- Revert deleting a file
git reset HEAD <file>

- Checking out
git checkout <branch_or_tag>

- Check the difference between the origin and the remote:
git diff origin/Nightly

- git add
- git add .
- git push origin <branch>
- git commit -a -m "message"
- git checkout <branch>
- git log
- git checkout -- .
- git pull origin
- git cherry-pick <commit_id>
- git reset HEAD~
- git log -p filename

- Hard reset
git reset --hard origin/Nightly

- Clean the untracked files/directories
git clean -f -d

- git fetch --all
- git reset --hard origin/master


  1. This comment has been removed by the author.

  2. Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us.devops training in bangalore

    devops training in bangalore

  3. Once you've determined the style, material and mounting method you want for your sink there's just one more criteria to think about - sizing. These days, most cooks look for a nice big sink, if they have the space. pure spa plus

  4. Thanks for sharing the important topic regarding gits. Please do keep sharing on...
    Best Online Software Training Institute | Data Structure Training