Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.01 KB

README.md

File metadata and controls

35 lines (30 loc) · 1.01 KB

Git Kata: Fast-forward Merge

Setup:

  1. Run . setup.sh (or .\setup.ps1 in PowerShell)

The task

You again live in your own branch, this time we will be doing a bit of juggling with branches, to show how lightweight branches are in git.

  1. Create a branch called uppercase
  2. Checkout the branch
  3. What is the output of git status?
  4. Edit the greeting.txt to contain an uppercase greeting
  5. Add greeting.txt files to staging area and commit
  6. What is the output of git branch?
  7. What is the output of git log --oneline --graph --all
  8. Checkout master branch
  9. Use cat to see the contents of the greetings
  10. Diff the branches
  11. Merge the branches
  12. Use cat to see the contents of the greetings
  13. Delete the uppercase branch

Useful commands

  • git branch
  • git branch <branch-name>
  • git branch -d <branch-name>
  • git checkout
  • git branch -v
  • git add
  • git commit
  • git commit -m
  • git merge <branch>
  • git diff <branchA> <branchB>
  • git log --oneline --graph --all