Last active
July 10, 2024 13:09
-
-
Save CharaD7/a03e53a890a2a8ee6b12ef45bf21f1d8 to your computer and use it in GitHub Desktop.
Git config settings for alx students
This file contains hidden or 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] | |
| acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f"; | |
| c = checkout | |
| com = checkout master | |
| cob = checkout -b | |
| b = branch | |
| # Delete branches. | |
| # -d for normal delete, -D for forced delete | |
| bd = branch -d | |
| bD = branch -D | |
| p = push | |
| pl = pull | |
| pom = push origin master | |
| pon = push origin main | |
| s = status | |
| # Undo a `git push` | |
| undopush = push -f origin HEAD^:master; | |
| # merge | |
| mm = merge master | |
| mn = merge main | |
| # Undo merge | |
| undomerge = reset --hard HEAD@{1}; | |
| # Undo changes not commited | |
| undo = reset --hard; | |
| # Undo last commit and remove from stage | |
| # Example | |
| # git unstage file1 file2 ... | |
| unstage = reset HEAD -- #file; | |
| [user] | |
| name = user_name | |
| email = user_email.doamin.com | |
| [core] | |
| ignorecase = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good resource