Skip to content

Instantly share code, notes, and snippets.

@CharlieYe0205
Last active July 12, 2020 01:02
Show Gist options
  • Save CharlieYe0205/2b36ef5056af581553a25f7011ea7918 to your computer and use it in GitHub Desktop.
Save CharlieYe0205/2b36ef5056af581553a25f7011ea7918 to your computer and use it in GitHub Desktop.
Git Fun

print git command results to stdout

git config --global core.pager "less -FRSX"

fix mac os upgrade issue

sudo xcode-select --install

update commit message

git commit --amend

stash

git stash
git stash -u
git stash save "message" # for multiple stash

git stash list

git stash apply
git stash drop

git stash pop

git stash show stash@{1}
git stash apply stash@{1}
git stash drop stash@{1}

git stash branch new_changes # create branch, apply stash and drop stash

tag

git tag -a v-1.0

git ignore

git rm -r --cached .
git add .
git commit -m "fixed untracked files"
Happy Coding ^_^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment