Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
233 views
in Technique[技术] by (71.8m points)

How do you merge a huge mess of branches in Sourcetree/Git?

I've been using Sourcetree with Git for my own version control, no other people on this project. I thought I made a new branch when I switched from my PC to my Mac, but then when I tried switching back to my PC and bringing all my new work together, everything has gotten absurdly out of hand. (I have no idea what's happening or what I'm doing.)

This is what I see on my PC (which has my most recent work): enter image description here

And this is what I see on my Mac: enter image description here

I haven't a clue even what question to ask, so please forgive this amateur post. How do I just get everything into one master branch or whatever so that both Mac and PC are committing to the same thing?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you have the latest changes on your PC you can delete the local branch on your Mac. (Assuming you already have those changes and the latest changes on your PC). You can push the latest changes from your PC branch and if you want to work on your Mac you can pull that change from the origin branch.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...