Skip to content

Instantly share code, notes, and snippets.

@mannharleen
Last active June 9, 2020 23:51
Show Gist options
  • Save mannharleen/9f55bbdc38895a38bea585facecf1d24 to your computer and use it in GitHub Desktop.
Save mannharleen/9f55bbdc38895a38bea585facecf1d24 to your computer and use it in GitHub Desktop.
git init
git add .
git commit -m "xyq"
git push -u origin ....

--

go to a previous commit

git reset --hard <commitNo>
git push --force # if want to push 

--

checkout a new bracch with target as a specific remote branch

git checkout -b dev -t origin/dev
git config --global alias.tree "log --oneline --decorate --all --graph"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment