What’s the best GitHub workflow for solo devs using multiple computers?

0
3
Asked By CodeCrafter42 On

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`?**

1 Answer

Answered By DevWizard22 On

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.

CuriousCoder99 -

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?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.