Git Flow

Setting up the repository

  1. Initialize a new Git repository (repo) and make initial file structure
  2. Create a new repository on GitHub
  3. Link your local and GitHub repository (add remote)
  4. Push structure to remote repository (add, commit, and push on the main branch)
  5. Add all team members as collaborators

Once the repository is setup, repeat this process

  1. start on main
  2. git checkout -b [feature-branch-name]
  3. do work
  4. commit (add, commit)
    • repeat until feature complete
  5. git checkout main
  6. git pull origin main
  7. git checkout [feature-branch-name]
  8. git merge main
  9. fix conflicts! (tells you on command line where to look in editor)
  10. run tests if applicable
  11. git push origin [feature-branch-name]
  12. go to GitHub! (hub browse)
  13. create a pull request (make sure its going to the right place)
  14. hit the ‘submit pull request’ button
  15. contact partner to review pull request
  16. partner merges pull request
  17. git checkout main, git pull origin main, and repeat the process

Lesson Search Results

Showing top 10 results