Git Up and Git Together

As the saying goes:
“In case of fire: git commit, git push, and leave the building.”
Funny, but in reality, using Git solo is a very different experience from collaborating on a dev team. Here’s a practical mental model to help you manage version control when working in a shared repository—let’s say one named icecap.
🧭 Version Control Workflow (for feature development):
git checkout main
andgit pull
→ Get the latest code from the remote main branch into your local main.git checkout rev00X
→ Switch to your local feature branch (e.g.,rev001
,rev002
, etc.).git rebase main
→ Update your local feature branch with the latest changes from localmain
.- Develop →
git commit
andgit push
→ Save progress locally and sync with the remote feature branch.
Repeat steps 1–4 until your feature is ready for review.
- Raise a Pull Request
→ Merge your remote feature branch (rev00X
) into the remote main. - Once merged,
git pull
on localmain
again
→ Bring your localmain
up to date with the remote.
Conclusion Key Takeaways
As a developer, you work with:
- Local branches: your workspace.
- Remote branches: shared team state.
While you’re developing your feature, the remote main
is evolving due to contributions from others. To avoid merge conflicts and stay in sync:
- Regularly rebase your feature on the latest
main
. - Keep your local and remote branches aligned.
This four-way sync—between local main
, local feature, remote main
, and remote feature—ensures a smooth, conflict-minimized workflow and clean pull requests.