DEV Community

Cover image for How do you use git when working solo?
Ben Halpern
Ben Halpern Subscriber

Posted on

How do you use git when working solo?

Oldest comments (67)

Collapse
 
sherrydays profile image
Sherry Day

Poorly

Collapse
 
rrampage profile image
Raunak Ramakrishnan

For solo projects, I use git as a journal using meaningful commit messages and to mark "save points" where I know the code is working fine. I use git tags as a memorable way to mark the aforementioned good commits. I do not make as much use of branches as I should because it is easy to checkout to a safe commit using tags.

Collapse
 
nissikazembe profile image
Nissi Lawrence Kazembe

Interesting usage, I will definitely adopt this. Quite a handy debugging method especially for side projects.

Collapse
 
ben profile image
Ben Halpern

Personally — I rarely branch off of main while working solo, but I do maintain high standards of committing regularly with good messages.

That's high level, but would love to hear a few more detailed answers from folks!

Collapse
 
renanfranca profile image
Renan Franca

I do the same. But I started to create branches to be committed to releasing a new version to myself 😅. So doesn't feel like an endless project 😆

Collapse
 
dendihandian profile image
Dendi Handian

pretty much the same

Collapse
 
rubiin profile image
Rubin

I second you Ben. I do maintain some quality commit messages following the conventional commit. That would help me in future track what went wrong and on which commit rather than scratching my head for an hour or two

Collapse
 
yechielk profile image
Yechiel Kalmenson

I generally don't branch off main unless I'm doing a long and fairly involved feature. Mainly so it should be easy to throw the work away if it turns out to be too hard or too long to keep working on.

Collapse
 
leob profile image
leob

Same for me - using it essentially in the same way but rarely using other branches than master.

Collapse
 
terabytetiger profile image
Tyler V.

For some of my earlier work projects, I have a dev, test, and prod branch set up and do the full dev > test > prod deployment cycle - although now that the main rollout is done and it's mostly small maintenance updates I don't have users do a proper testing of the test branch any more.

For newer projects I've been using a single branch and only branching if I want to do a major overhaul update - for example I overhauled the CSS to use Tailwind of one and I did that all in a side branch so that I could make sure they were okay with the minor changes before committing to prod 😅

Collapse
 
arsalakhan profile image
Arsala Khan

I try to commit important checkpoints so if something breaks I can check the log and do a hard reset to the last commit that worked. Since I enjoy finding creative ways to refactor code, this is super useful if I go down the won't refactoring path.

I don't stress too much about being religious with feature branches. I let the feature branches evolve naturally with the project.

Collapse
 
hoshiharetsu profile image
Rebecca DuPont

I use git for organizational purposes when working solo. I don't really stem off the main branch, but the commenting and commit notes help to keep my multiple projects organized and remind me where I was when I last left off. Overall, I think it's good practice to practice how you would work in a team environment, so I do not do sloppy messages when committing.

Collapse
 
rohithv07 profile image
Rohith V • Edited

While working solo, I will try a bunch of things like creating different branches, merging them, seeing the green getting darker in my contribution bar😂, good commit messages.
And moreover I am trying to get more comfortable using different commands and the errors that get popped up.
I mainly use it for learning purpose.

Collapse
 
thomasbnt profile image
Thomas Bnt

Always two branch for features : main and dev, but I can work direclty to the main if is a small changing.

Collapse
 
dumboprogrammer profile image
Tawhid

I use meaningful commit messages with checkpoint(like #1 or similar).While I push to a test branch and if everything is okay I merge it with the main branch.I sometimes use git tags.

All of this is true unless I'm working on a personal project .-.

Collapse
 
lukewestby profile image
Luke Westby

lots of commits to main with messages like “changes” and “more changes”

Collapse
 
randomblock1 profile image
Benjamin G.

70% "fix"
25% "added [thing]"
5% random rambling
100% useless to anyone but me

Collapse
 
fyrfli profile image
Camille

2:00am - “saving here to continue tomorrow”
10:00am - “done”
6:00pm - “mobile styling done”
6:01pm - “oops forgot something”
… etc