Skip to content

Instantly share code, notes, and snippets.

@rudylattae
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save rudylattae/490790ad49931498f45a to your computer and use it in GitHub Desktop.

Select an option

Save rudylattae/490790ad49931498f45a to your computer and use it in GitHub Desktop.

Revisions

  1. rudylattae revised this gist Sep 4, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -35,9 +35,9 @@ In editor, squash all commits into first:

    Editor reopens, write up an apropriate commit message:

    [#44] New Feature
    * Did dome new stuff
    * Added another file (it was needed!)
    [#44] New Feature
    * Did dome new stuff
    * Added another file (it was needed!)

    Merge feature branch into next, push it to server, then delete the local branch

  2. rudylattae revised this gist Sep 4, 2014. 1 changed file with 26 additions and 26 deletions.
    52 changes: 26 additions & 26 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,67 +1,67 @@
    ## Remote branch

    ```sh
    git push origin master:refs/heads/next
    git co --track origin/next
    ```
    git push origin master:refs/heads/next
    git co --track origin/next


    ## Start new feature

    git co -b newfeat

    git co -b newfeat


    ## Hack

    touch file1.txt && git add file1.txt
    git ci -m "Some new stuff"
    touch fileA.txt && git add fileA.txt
    git ci -m "Another file"
    touch file1.txt && git add file1.txt
    git ci -m "Some new stuff"
    touch fileA.txt && git add fileA.txt
    git ci -m "Another file"

    Roll your local changes on top of latest from remote next branch:

    git co next
    git pull
    git co fewfeat
    git rebase next
    git co next
    git pull
    git co fewfeat
    git rebase next

    Interactive rebase - Flatten local commits:

    git rebase -i next
    git rebase -i next

    In editor, squash all commits into first:

    pick bbg4e3e Some new stuff
    squash 7yas3d4 Another file
    pick bbg4e3e Some new stuff
    squash 7yas3d4 Another file

    Editor reopens, write up an apropriate commit message:

    [#44] New Feature
    [#44] New Feature
    * Did dome new stuff
    * Added another file (it was needed!)

    Merge feature branch into next, push it to server, then delete the local branch

    git co next
    git merge newfeat
    git push origin next
    git br -d newfeat
    git co next
    git merge newfeat
    git push origin next
    git br -d newfeat


    ## Release

    Merge next into master

    git co master
    git merge next
    git co master
    git merge next

    Tag release

    git tag 0.0.1
    git tag 0.0.1

    Push to server

    git push
    git push --tags
    git push
    git push --tags

    ## Hotfixes for bugs

  3. rudylattae revised this gist Sep 4, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## Remote branch

    ```shell
    ```sh
    git push origin master:refs/heads/next
    git co --track origin/next
    ```
  4. rudylattae revised this gist Sep 4, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,9 @@
    ## Remote branch

    ```shell
    git push origin master:refs/heads/next
    git co --track origin/next

    ```

    ## Start new feature

  5. rudylattae created this gist Sep 4, 2014.
    73 changes: 73 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    ## Remote branch

    git push origin master:refs/heads/next
    git co --track origin/next


    ## Start new feature

    git co -b newfeat


    ## Hack

    touch file1.txt && git add file1.txt
    git ci -m "Some new stuff"
    touch fileA.txt && git add fileA.txt
    git ci -m "Another file"

    Roll your local changes on top of latest from remote next branch:

    git co next
    git pull
    git co fewfeat
    git rebase next

    Interactive rebase - Flatten local commits:

    git rebase -i next

    In editor, squash all commits into first:

    pick bbg4e3e Some new stuff
    squash 7yas3d4 Another file

    Editor reopens, write up an apropriate commit message:

    [#44] New Feature
    * Did dome new stuff
    * Added another file (it was needed!)

    Merge feature branch into next, push it to server, then delete the local branch

    git co next
    git merge newfeat
    git push origin next
    git br -d newfeat


    ## Release

    Merge next into master

    git co master
    git merge next

    Tag release

    git tag 0.0.1

    Push to server

    git push
    git push --tags

    ## Hotfixes for bugs

    * Fix on master
    * Tag as patch release
    * Push to server
    * Merge change into next


    **Learned from http://www.joslynesser.com/blog/archives/2010/09/06/git-workflow-for-small-teams/**