Skip to content

Instantly share code, notes, and snippets.

@adamz01h
Created April 27, 2023 17:42
Show Gist options
  • Select an option

  • Save adamz01h/507d0133db11f5be2f4e93887e203d9d to your computer and use it in GitHub Desktop.

Select an option

Save adamz01h/507d0133db11f5be2f4e93887e203d9d to your computer and use it in GitHub Desktop.
git help
roll back branch
git checkout <branch>
git reset --hard <commit>
git push --force origin master
create new from current
git checkout -b <branch>
always assume file is unchanged.
git update-index --assume-unchanged <file>
git config credential.helper
git config --global credential.helper store
add file to .gitignore
commit it, then
git rm -r --cached <file>
now file should be ignored
git remote -v
origin http://github.com/{USERNAME}/{PROJECTNAME}.git (fetch)
origin http://github.com/{USERNAME}/{PROJECTNAME}.git (push)
git remote set-url origin [email protected]:salt_black_box/saltblackbox.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment