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.

Revisions

  1. CharaD7 revised this gist Dec 14, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    [alias]
    i = init
    f = fetch
    pr = fetch origin +refs/pull/*/head:refs/remotes/origin/pr/*
    cl = clone

    rao = remote add origin
  2. CharaD7 revised this gist Nov 29, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,7 @@

    p = push
    pl = pull
    pa = pull -all
    pon = push origin main
    plon = pull origin main

    @@ -34,6 +35,7 @@

    # merge
    mn = merge main
    m = merge

    # Undo merge
    undomerge = reset --hard HEAD@{1};
  3. CharaD7 revised this gist Nov 11, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@
    con = checkout main
    cob = checkout -b
    b = branch
    br = branch -r

    # Display current reomte connections
    r = remote -v
    @@ -46,7 +47,7 @@
    unstage = reset HEAD -- #file;
    [user]
    name = user_name
    email = user_email.doamin.com
    email = user_email@doamin.com

    [core]
    ignorecase = false
  4. CharaD7 revised this gist Aug 24, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,10 @@
    i = init
    f = fetch
    cl = clone

    rao = remote add origin
    rso = remote set-url origin

    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    c = checkout
    con = checkout main
  5. CharaD7 revised this gist Aug 20, 2021. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,10 @@
    [alias]
    i = init
    f = fetch
    cl = clone
    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    c = checkout
    com = checkout master
    con = checkout main
    cob = checkout -b
    b = branch

    @@ -18,17 +19,15 @@

    p = push
    pl = pull
    pom = push origin master
    pon = push origin main
    plon = pull origin main

    s = status

    # Undo a `git push`
    undopush = push -f origin HEAD^:master;
    undopushn = push -f origin HEAD^:main;
    undopush = push -f origin HEAD^:main;

    # merge
    mm = merge master
    mn = merge main

    # Undo merge
  6. CharaD7 revised this gist Aug 20, 2021. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -46,4 +46,7 @@
    email = user_email.doamin.com

    [core]
    ignorecase = false
    ignorecase = false

    [init]
    defaultBranch = main
  7. CharaD7 revised this gist Aug 9, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,15 @@
    [alias]
    i = init
    f = fetch
    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    c = checkout
    com = checkout master
    cob = checkout -b
    b = branch

    # Display current reomte connections
    r = remote -v

    # Delete branches.
    # -d for normal delete, -D for forced delete
    # Example g bd branch_name OR g bD branch_name
  8. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,7 @@

    # Undo a `git push`
    undopush = push -f origin HEAD^:master;
    undopushn = push -f origin HEAD^:main;

    # merge
    mm = merge master
  9. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -19,11 +19,11 @@
    s = status

    # Undo a `git push`
    undopush = push -f origin HEAD^:master;
    undopush = push -f origin HEAD^:master;

    # merge
    mm = merge master
    mn = merge main
    # merge
    mm = merge master
    mn = merge main

    # Undo merge
    undomerge = reset --hard HEAD@{1};
  10. CharaD7 revised this gist Aug 6, 2021. No changes.
  11. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@

    # Delete branches.
    # -d for normal delete, -D for forced delete
    # Example g bd branch_name OR g bD branch_name
    bd = branch -d
    bD = branch -D

  12. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,11 @@
    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
  13. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    [alias]
    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    c = checkout
    com = checkout master
    cob = checkout -b
    b = branch
  14. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,10 @@

    # Undo a `git push`
    undopush = push -f origin HEAD^:master;

    # merge
    mm = merge master
    mn = merge main

    # Undo merge
    undomerge = reset --hard HEAD@{1};
  15. CharaD7 created this gist Aug 6, 2021.
    32 changes: 32 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    [alias]
    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    com = checkout master
    cob = checkout -b
    b = branch

    p = push
    pl = pull
    pom = push origin master
    pon = push origin main

    s = status

    # Undo a `git push`
    undopush = push -f origin HEAD^:master;

    # 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