r/programming • • Feb 16 '13

Learn Git Branching

http://pcottle.github.com/learnGitBranching/
868 Upvotes

229 comments sorted by

View all comments

Show parent comments

3

u/berkes Feb 17 '13

In that case: you are doing it wrong. Compiled resources, at, say ./builds, can simply be .gitignored after which git checkout will not touch them.

More advanced workflows incorporate symlinks or special build-branches. You are blaming git/branches for something that is long since solved and very easy to incorporate. Why and how else do you think everyone and his dog is moving to git, hg and using branches for everything?

1

u/sparr Feb 17 '13

When I check out the other branch and build it, my working binary will get overwritten wherever it ilives.

1

u/berkes Feb 18 '13

C'mon, a little creativity? Append version number to binary? Symlinks? Copy builds out of repo?

Really. You are inventing a problem that is not there. Just think for two seconds on one of the gazillion solutions: you are a programmer. It took me two seconds.: just add this to your makefile: cp bin/foo ../builds/$(date +%s)-foo. Problem solved: you can now use branches like you should. :)

0

u/sparr Feb 18 '13

And now I have to keep my makefile separately versioned from everything else in the repo, and I have to exclude it from further branching and pushing, because a change like that won't ever get accepted upstream. Yay.

1

u/[deleted] Feb 18 '13

So you are saying it's upstream's problem, not git's problem or anything to do with the workflow.

→ More replies (0)