Skip to content

Instantly share code, notes, and snippets.

@mohfahrul
Last active July 26, 2022 03:27
Show Gist options
  • Save mohfahrul/93eb896359243166acfe7e43babcfcc2 to your computer and use it in GitHub Desktop.
Save mohfahrul/93eb896359243166acfe7e43babcfcc2 to your computer and use it in GitHub Desktop.
git snippet
# flow kerja
- git checkout -b feature-1234
- [coding]
- git add .
- git commit -m "mesage feature"
- git pull origin develop --rebase
- git push origin feature-1234 -f
- create pull request di website github / pakai extension
# log. melihat log commit
- git log
# status. melihat status git
- git status
# Undo the most recent local commits
- git reset HEAD~
# remove modified file
- git reset --hard HEAD
# rebase. menggabungkan beberapa commit
- git rebase -i Head~2
# push newbranch to remote
- git push -u origin localBranchName:remoteBranchName
# force push local branch to remote branch
- git push -f origin your_branch:some_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment