Mehedi Hassan Piash | Senior Software Engineer | Android | iOS | KMP | Ktor | Jetpack Compose | React-Native.

September 25, 2019

Git Bibel [Git command]

September 25, 2019 Posted by Piash No comments

  • Clone repository : git clone "repository_name"
  • Commit changes : git commit -m "[commit message]"
  • Show last five commit : git log --oneline -5
  • Merging multiple commit to single commit: git merge --squash [branch_name]
  • Git fetch : git fetch origin
  • CheckOut with a new local branch: git checkout -b name origin/develop
  • Push only changes: git push origin HEAD:refs/for/develop
  • Modify existing pushed commit by Id: git push origin HEAD:refs/changes/53172
  • Cherry-pick [Particular commit]: git cherry-pick c41a50e8[commit_id]
  • Save uncommitted change: git stash
  • Save uncommitted change by Id: git stash save 'abc_stash'
  • Reset current changes till last commit: git reset --hard'

0 comments:

Post a Comment