Overwrite git with pull or check out

Asked 2 years ago, Updated 2 years ago, 49 views

Two people worked separately under the same project. I'd like to receive the sauce from another person's git. At this time, only the source name is the same, and the contents have changed a lot. There is also a change to the presence or absence of the source file itself. The beginning was the same project, but now about 40% is a different project. In this case, can you completely overwrite git with pull or check out command? Or I would like to know if I have no choice but to delete all the existing local sources and pull them out. You can erase the local source, but I wanted to leave it in my history I would like to inquire.

git github pull checkout

2022-09-22 08:07

1 Answers

If you worked in the same branch, just pull it out. If you pull it, all the changed parts will be conflict with the files you modified. Merge well, commit, and push. If you worked in another branch, you can pull it out and merge the branch you worked on and push it.

I don't know what kind of git tool you use, but if you use sourceTree, you can easily solve conflict.

The conflicting files are displayed in a triangle as shown in the attachment below. If you merge them with your file, if you are going to merge them with your file, if you are going to do the file from the Resolve Using Mine server, it will automatically merge by itself.

Or, if you need to merge both properly, you can merge them directly with the editor and press Mark Resolved.


2022-09-22 08:07

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.