Skip to content

Instantly share code, notes, and snippets.

@daredrum
Last active August 2, 2016 18:25
Show Gist options
  • Select an option

  • Save daredrum/7b3a0dbaea35463bb2227ac88fd78e30 to your computer and use it in GitHub Desktop.

Select an option

Save daredrum/7b3a0dbaea35463bb2227ac88fd78e30 to your computer and use it in GitHub Desktop.

Revisions

  1. daredrum revised this gist Aug 2, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git_methods.txt
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ git branch -D feature_branch

    ### Edit old commits
    git rebase --i 'bbc643cd^'
    # edit code #
    # change 'pick' on 'edit' and after edit code #
    git commit --all --amend --no-edit
    git rebase --continue
    git push -f origin branch
  2. daredrum revised this gist Aug 2, 2016. 1 changed file with 10 additions and 3 deletions.
    13 changes: 10 additions & 3 deletions git_methods.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,14 @@
    # Override local branch from remote
    ### Override local branch from remote
    git fetch origin feature_branch
    git reset --hard origin/feature_branch

    # Remove branch remotely and locally
    ### Remove branch remotely and locally
    git push origin feature_branch
    git branch -D feature_branch
    git branch -D feature_branch

    ### Edit old commits
    git rebase --i 'bbc643cd^'
    # edit code #
    git commit --all --amend --no-edit
    git rebase --continue
    git push -f origin branch
  3. daredrum revised this gist Jul 29, 2016. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions git_methods.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    # Override local branch from remote
    git fetch origin master
    git reset --hard origin/master
    git fetch origin feature_branch
    git reset --hard origin/feature_branch

    # Remove branch remotely and locally
    git push origin feature_branch
    git branch -D feature_branch
  4. daredrum renamed this gist Jul 29, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. daredrum renamed this gist Jul 29, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. daredrum created this gist Jul 29, 2016.
    3 changes: 3 additions & 0 deletions git_methods.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # Override local branch from remote
    git fetch origin master
    git reset --hard origin/master