Skip to content

Instantly share code, notes, and snippets.

@heridev
Last active July 6, 2024 21:37
Show Gist options
  • Save heridev/244e75dbe2e21430b093d7c6ee4f8b4b to your computer and use it in GitHub Desktop.
Save heridev/244e75dbe2e21430b093d7c6ee4f8b4b to your computer and use it in GitHub Desktop.

Revisions

  1. heridev revised this gist Jul 6, 2024. No changes.
  2. heridev revised this gist Jul 6, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions 8-commit-history.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    * (HEAD -> master) Add feature-two.txt
    * Feature two: change in file.txt
    * Add feature-one.txt
    * Feature one: change in file.txt
    * Previous commits on master...
  3. heridev revised this gist Jul 6, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions 7-resolve-merge-conflict.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # Edit file.txt to resolve the conflict
    git add file.txt
    git rebase --continue
  4. heridev revised this gist Jul 6, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions 6-git-rebase.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    git rebase feature-two
  5. heridev revised this gist Jul 6, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions 5-commit-history.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    * (HEAD -> master) Add feature-one.txt
    * Feature one: change in file.txt
    * Previous commits on master...
  6. heridev revised this gist Jul 6, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions 4-master-rebase.tool
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    git checkout master
    git rebase feature-one
  7. heridev revised this gist Jul 6, 2024. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions 3-second-branch-commit.tool
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    git checkout feature-two
    echo "Change in feature-two" >> file.txt
    git add file.txt
    git commit -m "Feature two: change in file.txt"
    echo "This is feature-two.txt" > feature-two.txt
    git add feature-two.txt
    git commit -m "Add feature-two.txt"
  8. heridev renamed this gist Jul 6, 2024. 1 changed file with 0 additions and 0 deletions.
  9. heridev revised this gist Jul 6, 2024. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions 2-first-branch-commits.command
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    git checkout feature-one
    echo "Change in feature-one" >> file.txt
    git add file.txt
    git commit -m "Feature one: change in file.txt"
    echo "This is feature-one.txt" > feature-one.txt
    git add feature-one.txt
    git commit -m "Add feature-one.txt"
  10. heridev renamed this gist Jul 6, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  11. heridev renamed this gist Jul 6, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  12. heridev renamed this gist Jul 6, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1-create-branches.shell → 1-create-branches.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    git checkout master
    git branch feature-one
    git branch feature-two
    git branch feature-two
  13. heridev renamed this gist Jul 6, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  14. heridev created this gist Jul 6, 2024.
    3 changes: 3 additions & 0 deletions 1-create-branches.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    git checkout master
    git branch feature-one
    git branch feature-two