Last active
April 18, 2023 19:58
-
-
Save danstepanov/33cb3285877779802da3eb2ac50b660a to your computer and use it in GitHub Desktop.
Useful git aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
cob = checkout -b | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cm = !git add -A && git commit -m | |
bclean = "!f() { git branch --merged ${1-main} | grep -v "${1-main}$" | xargs git branch -d; }; f" | |
bdone = "!f() { git co ${1-main} && git up && git bclean ${1-main}; }; f" | |
po = push origin | |
st = status | |
undolastcommit = reset HEAD~ | |
reverttomain = !git fetch origin && git reset --hard origin/main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to configure gitconfig to use vscode, you can run
then you can access the gitconfig by running
Source