Skip to content

Instantly share code, notes, and snippets.

@geekbass
Last active December 28, 2018 19:15
Show Gist options
  • Select an option

  • Save geekbass/a3c09ae8e5907b3c27d1168a46f745cb to your computer and use it in GitHub Desktop.

Select an option

Save geekbass/a3c09ae8e5907b3c27d1168a46f745cb to your computer and use it in GitHub Desktop.

Revisions

  1. Weston Bassler revised this gist Dec 28, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions squash-commits.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    # Update Branch with Master if been updated since
    ### Update Branch with Master if been updated since
    git pull origin master

    # Check commit history for $N number of Commits
    ### Check commit history for $N number of Commits
    git reset --soft HEAD~$N
    git commit -m "squashing commits"

    # If preivous push(s) to repo, force push (+)
    ### If preivous push(s) to repo, force push (+)
    git push origin +name-of-feature-branch

    # else, if no previous pushes then just push without force
    ### else, if no previous pushes then just push without force
    git push origin name-of-feature-branch
  2. Weston Bassler revised this gist Dec 28, 2018. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions squash-commits.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    # Update Branch with Master if been updated since
    git pull origin master
    git pull origin master

    # Check commit history for $N number of Commits
    git reset --soft HEAD~$N
    git commit -m "squashing commits"

    git reset --soft HEAD~$N
    git commit -m "squashing commits"
    # If preivous push(s) to repo, force push (+)
    git push origin +name-of-feature-branch
    git push origin +name-of-feature-branch

    # else, if no previous pushes then just push without force
    git push origin name-of-feature-branch
    git push origin name-of-feature-branch
  3. Weston Bassler renamed this gist Dec 28, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. Weston Bassler created this gist Dec 28, 2018.
    12 changes: 12 additions & 0 deletions squash-commits
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # Update Branch with Master if been updated since
    git pull origin master

    # Check commit history for $N number of Commits
    git reset --soft HEAD~$N
    git commit -m "squashing commits"

    # If preivous push(s) to repo, force push (+)
    git push origin +name-of-feature-branch

    # else, if no previous pushes then just push without force
    git push origin name-of-feature-branch