How to Resolve Conflicts in Files and Push the code to Git


Posted on : 17-05-2012 | By : | In : Git, Programming Languages

If you are facing some conflict issues in some file(s) during commit or merge then you can follow the below procedure to resolve conflicts. You don’t need mergetool for this. It can be resolved pretty easily manually. WinMerge is pretty good tool to resolve these kinds of conflict issues.

1. First see and identify which files are in conflict by using git status command.
2. Open each file in text editor and examine the difference and resolve them by removing the code that you don’t need. You may need to discuss it with fellow developers/designers who committed the code.
3. Once you’ve resolved the conflict in a file then use git add file_name_with_complete_path.
4. Once you’ve resolved all conflicts then use the command git commit -a -m “resolved conflict in files”
5. Now use the command git push origin YourBranchName to push your changes to Git repository.
programming languages git server repository  view git logo

Tags: , , ,

If you liked this post you may want to Subscribe to Latest CodeMasterz buzz about Tech Tips, Worpdress Tips and more updates in your inbox.

Enter your email address:     Delivered by FeedBurner

Post a comment