Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other I need an efficient workflow Reply To: I need an efficient workflow

#158102
__
Participant

I just google commands when I run into a problem. Try the “official” tutorial, though.

Learn how to init, add, commit, and push/pull. After you get a a little comfortable, learn about branch and .gitignore files.

Note, there’s more to git than not being “afraid to break things.” I use git for deployment and remote backups also.

Not a tutorial, but some suggestions/pointers:

1) init has a “--bare” option. This is a regular repo, but with no working tree. It’s useful if you want a place to use as a “master backup” repo that you can always push/pull/clone from. I also make one on my production servers as a “staging” repo for pushing updates to a live site.

For your regular “working” repos, just do git init.

2) When you’re just doing work, you’ll usually just work,add,commit normally. If you have a project that you want to preserve (e.g., everything works perfectly but you want to try changing one little bit that could potentially break it all), create a new branch:

checkout -b <branch-name>

…where is whatever you want to call your new branch. Then, work normally. If you need to go back to your “known good” state, just checkout master and everything is sunshine again.

3) I’ll suggest other stuff as I think of it. Or, you experiment and ask questions.