Professional Git by Brent Laster

Professional Git by Brent Laster

Author:Brent Laster [Laster, Brent]
Language: eng
Format: azw3, pdf
ISBN: 9781119285007
Publisher: Wiley
Published: 2016-11-27T16:00:00+00:00


To help you understand the point of this workflow, I note again that if a merge operation has no conflicts, the files are merged in the working directory and end up in the local repository with no user intervention. It's as if Git staged and committed the entire set of merged content for you. However, when there are conflicts that Git can't resolve, it can't do that entire process. So, it does as much as it can.

For the files that merged cleanly or didn't need to merge, Git goes ahead and stages them. This involves using the staging area as the Prepare case I talked about in Chapter 3. Because the commit you are trying to merge is treated as a unit, Git wants to have all of the updated files staged so they can then be committed as a unit to complete the merge. Git does what it can toward this goal by staging the files that don't have unresolved conflicts.

For files that have conflicts that Git can't resolve, it puts them in the working directory with the merge conflicts marked. If you're working in the command line, the conflicts will be marked with ≪ and ≫ lines. (See the section “Alternative Style for Conflict Markers,” for more details.)

The idea is that the user will resolve all the remaining conflicts in whatever way is appropriate, and then will stage all of those files. Those files, in combination with the files that Git staged previously, comprise a complete set in the staging area.

The last step is to merge that complete set that makes up the commit into the local repository and thus complete the merge. You end up with the complete set merged in the working directory and in the local repository, just as you would if everything had merged cleanly in the first place.

Once the merge is completed by resolving the conflicts, staging the fixed files, and doing the commit of the full set, Git is happy and the MERGING state is ended.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.