TCannadySF
TCannadySF

Reputation: 286

Git Merge: having trouble with a basic merge

I'm new to Git so please pardon any shortsightedness.

I'm trying to update my Master branch. I created a new branch called myWebsite, and it contains the changes I want to make. I've pushed it to GitHub, and my repo sees the branch.

When comparing the two, I usually set the left drop-down to "Base: Master" and the right to "Compare: [branch to be compared]". I did this, but GitHub wasn't seeing any changes.

I grew impatient and swapped the two drop downs and merged it, and I think that just got me in more of a rut. I tried Reverting, but that just made it more confusing.

I think I cleaned it up enough to have a springboard to finally make the changes. I left the prior merge un-reverted for now.

Thanks for any guidance. And as a side-note, the reason I'm pulling and merging my own requests is simply to practice seeing both sides of the equation. I understand this isn't normal for a working environment.

Upvotes: 0

Views: 49

Answers (1)

vgoff
vgoff

Reputation: 11323

Great initiative to doing the pull requests and branch practice, it will definitely help.

Know that reverting changes adds a commit and reverses the patch that was applied in a former commit. So that will cause more pain.

If you really need to go back in time, you may want to simply git reset --HARD SHA which will get your environment to that SHA and go from there.

This does change your history and has other implications, but while you are practicing you can note these things and be better informed when you are working with others.

I don't know if you are using some graphical tool or the website to make these changes. I tend to use only the command line. This is helpful, because as you are learning, you can actually grab your command history and make notes on it. That is a little bit harder to do in a graphical tool, unless you have a video recorder, or screen recorder.

Upvotes: 1

Related Questions