Skip to content

Instantly share code, notes, and snippets.

@yehorhromadskyi
Last active July 6, 2021 11:32
Show Gist options
  • Save yehorhromadskyi/aa17ee29c7a22c317e44f4d0f2ea7368 to your computer and use it in GitHub Desktop.
Save yehorhromadskyi/aa17ee29c7a22c317e44f4d0f2ea7368 to your computer and use it in GitHub Desktop.
$ git log --graph --oneline --all
$ git stash save "my_stash"
$ git stash list
$ git stash pop stash@{n}
$ git stash apply stash@{n}
$ git commit -m "Title" -m "Description ..........";
$ git checkout [name_of_branch]
$ git checkout -b [name_of_your_new_branch]
$ git push origin [name_of_your_new_branch]
$ git restore . // reset changes
$ git checkout .
$ git clean -ndx
$ git clean -fdx
$ git pull
$ git submodule update --init --recursive
$ git submodule foreach git pull origin [name_of_branch]
$ git update-index --assume-unchanged [file_name]
$ git rebase -i HEAD~[number_of_commits]
git fetch --prune origin "+refs/tags/*:refs/tags/*"
git tag <tag_name>
git push origin refs/tags/<tag_name>:refs/tags/<tag_name>
git push --delete origin <tag_name>
$ git merge -Xignore-all-space {branch name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment