Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

Intermediate workflow – Git

Details

Here’s an intermediate Git workflow you can use to practice branching, staging files and making commits.

Setup

  • Create your project folder.
  • Create some files and write some code.
  • Initialize the Git repo.
  • Make an initial commit on the master branch (this is so the master branch will actually get created).
  • Create a feature/topic branch and switch to it.

The second and third steps in the setup can be flipped if you prefer to initialize the repo first.

Workflow

  • Write some code and save your files.
  • Stage your files. You can either stage all of them or just some of them.
  • Commit the changes.
  • After you’ve completed your feature, you can merge the changes into the master branch.
  • Create a new branch when it’s time to add more changes.

Exercises

There are no exercises for this lesson.

References

Recording Changes to the Repository from the Git Pro book

Basic Branching and Merging from the Git Pro book

Back to: Git Course > Git Intermediate