Skip to content

Instantly share code, notes, and snippets.

@CharaD7
Forked from sarthaksavvy/.gitconfig
Last active August 6, 2021 18:31
Show Gist options
  • Save CharaD7/cb0ad320e980c4f0dbad0b5528b542a9 to your computer and use it in GitHub Desktop.
Save CharaD7/cb0ad320e980c4f0dbad0b5528b542a9 to your computer and use it in GitHub Desktop.

Revisions

  1. CharaD7 revised this gist Aug 6, 2021. 1 changed file with 13 additions and 1 deletion.
    14 changes: 13 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,29 @@
    [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
    # Example g bd branch_name OR g bD branch_name
    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;
    undopush = push -f origin HEAD^:master;

    # merge
    mm = merge master
    mn = merge main

    # Undo merge
    undomerge = reset --hard HEAD@{1};
  2. CharaD7 revised this gist Aug 4, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -24,8 +24,8 @@
    # git unstage file1 file2 ...
    unstage = reset HEAD -- #file;
    [user]
    name = sarthaksavvy
    email = bitfumes@gmail.com
    name = user_name
    email = user_email.doamin.com

    [core]
    ignorecase = false
  3. CharaD7 revised this gist Jun 27, 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
    @@ -6,6 +6,7 @@

    p = push
    pl = pull
    pom = push origin master

    s = status

  4. @sarthaksavvy sarthaksavvy revised this gist Jan 31, 2020. 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,4 +1,5 @@
    [alias]
    acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
    com = checkout master
    cob = checkout -b
    b = branch
  5. @sarthaksavvy sarthaksavvy revised this gist Jan 31, 2020. 1 changed file with 14 additions and 4 deletions.
    18 changes: 14 additions & 4 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,4 @@
    [alias]
    acm = ! git add . && git commit -m
    add-commit = !git add -A && git commit

    co = checkout
    com = checkout master
    cob = checkout -b
    b = branch
    @@ -11,6 +7,20 @@
    pl = pull

    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 = sarthaksavvy
    email = [email protected]
  6. @sarthaksavvy sarthaksavvy revised this gist Jan 29, 2020. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,16 @@
    [alias]
    acm = ! git add . && git commit -m
    add-commit = !git add -A && git commit

    co = checkout
    com = checkout master
    cob = checkout -b
    b = branch

    p = push
    pl = pull

    s = status
    [user]
    name = sarthaksavvy
    email = [email protected]
  7. @sarthaksavvy sarthaksavvy revised this gist Jan 29, 2020. 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
    @@ -5,4 +5,7 @@
    b = branch
    [user]
    name = sarthaksavvy
    email = [email protected]
    email = [email protected]

    [core]
    ignorecase = false
  8. @sarthaksavvy sarthaksavvy created this gist Aug 9, 2019.
    8 changes: 8 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    [alias]
    acm = ! git add . && git commit -m
    add-commit = !git add -A && git commit
    co = checkout
    b = branch
    [user]
    name = sarthaksavvy
    email = [email protected]