Re: [git-users] Re: branching a single file
On Mon, Apr 16, 2012 at 12:44:56AM -0700, tombert wrote: > Only the differences are stored - that is understood ... > but I don't think that this solves my problem: > > B - D - E (several files changed) > / > A > \ > C - F (only one file makes the difference to the B branch) > > > > So what is the best way of getting the changes D and E into my C branch? $ git checkout C $ git merge -s ours B 1) Git has no problems with repeated merges, so you can perform this kind of merging any time you see fit. 2) The "ours" merge strategy makes sure that your changes always trump the changes being merged. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: branching a single file
Only the differences are stored - that is understood ... but I don't think that this solves my problem: B - D - E (several files changed) / A \ C - F (only one file makes the difference to the B branch) So what is the best way of getting the changes D and E into my C branch? Create a patch excluding that specific file? or merging branches excluding that specific file? thx -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/2cSGM1bBgfIJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: branching a single file
Hi, Branching out only a part of a repository is not possible. Luckily, only the difference in changed files are stored on top of the original content, so if you only change one file in a branch, there is very little syncing to be done. Simply put: only the files you have changed will be synced. So go ahead and branch, and don't worry about it if you only change a few files. This is a normal workflow with Git. On Saturday, April 14, 2012 8:33:44 PM UTC+2, tombert wrote: > > Hi, > > I would need to create a branch from a project but only one file needs to > be changed. > I don't want to sync other files each time there are changes in one or the > other branch. > Is this possible in git? > > thx > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/96Q8m2eFC0sJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.