What's the best GitHub workflow for solo devs using multiple computers?
Asked by
TundraVisitor
I'm new to GitHub and currently developing a web app as a solo project. I've got my repository set up on my desktop and laptop, and I sometimes make small changes through the GitHub website at work. I'm curious about the usual workflow for someone like me. Is my understanding correct? Usually, I would: 1. Open the command line in my project folder on either computer and run a `git pull`, 2. Work on my project, 3. After that, run `git add .`, 4. Then do `git commit -m "[commit message]"`, 5. Finally, I would execute `git push`. **TL;DR: Is it standard to always start and end work sessions with `git pull` and `git push`?**
Answers
Yeah, you're on the right track! I usually skip `git pull` if I'm on the same branch, but it's a good habit for syncing changes especially when switching devices. That's about 90% of the typical interactions you'll make with Git.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_95th theorem: But isn't the pull command just updating your files to the latest version that was pushed to GitHub? So if I'm on the same device after a break, I can just skip it? When should I definitely run pull?