Skip to content

Instantly share code, notes, and snippets.

@CharaD7
Last active July 10, 2024 13:09
Show Gist options
  • Save CharaD7/a03e53a890a2a8ee6b12ef45bf21f1d8 to your computer and use it in GitHub Desktop.
Save CharaD7/a03e53a890a2a8ee6b12ef45bf21f1d8 to your computer and use it in GitHub Desktop.
Git config settings for alx students
[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
@RamadanDY
Copy link

good resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment