git and C++ workflow, how to handle object and archive files?

前端 未结 8 1841
鱼传尺愫
鱼传尺愫 2021-02-05 20:40

I use git to interface with an SVN repository. I have several git branches for the different projects I work on.

Now, whenever I switch from one branch to another using

8条回答
  •  旧时难觅i
    2021-02-05 21:12

    If the compiled executables are files that have been checked in
    then git stash solves the problem.

    [compile]
    git stash save "first branch"
    git checkout other_branch
    [Fiddle with your code]
    [compile]
    git stash save "second branch"
    git checkout first_branch
    git stash apply [whatever index your "first branch" stash has]
    # alternatively git stash pop [whatever index...]
    

    If the compiled executables are files that have not and will not be checked in
    then simply add them to .gitignore

提交回复
热议问题