the project working on @ moment uses git , gitflow workflow methodology. have hit stumbling block gitflow which, believe, originates underlying functionality of git. problem regarding feature branches.
with subversion create 2 branches of our repository, check them out separate eclipse projects in workspace , edit them in parallel. edit files in both of these projects in isolation 1 another. changes made files in 1 branch not reflected in other, , vice versa.
with git, can create 2 feature branches in repository clone. whenever create or edit file in 1 branch, if not commit changes before switching second branch, changes appear in second branch. likewise, if change same file in second branch, , switch first again, file contains of changes have made far, regardless of branch on when change made.
to make matters worse, if add , commit changes in second branch, file in second branch contain changes made first , second branches, , changes disappear first branch!
is there way have feature branches isolated 1 such files, , changes files, not reflected across both feature branches before committing?
i realise commit changes before switching branch, or create separate repository clone each feature. both of these approaches seem defeat purpose of having branches.
unfortunately no. due nature of branches in git, have not committed come along when switch branches. if don't want make commit, can use git stash undo changes temporarily.
this 1 of 'features' of git, doing development in 1 place , not have have multiple copies of projects in different places. can switch branches , not change directories or projects.
sorry, going have careful switching branches if want use git. or make them 2 separate repos.
Comments
Post a Comment