Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Repo "MashUp"

Hi Guys, I have an issue here So Computer A work on ProjectA and create a repo Computer B work on ProjectA and create its own repo Now we have 2 repo working on ProjectA

Any idea to merge both repo ? Thanks

Kevin Niedermayr
Kevin Niedermayr
3,072 Points

So you are both working from another computer on the same branch in "Project A"?

4 Answers

so here's the case.. i previously never use git before... so after i learn from teamtreehouse, i set up a repo in my project A. Fortunately, my colleague already use git in his project A...

so now.. we're working on same project, but we have different repo..

thinking to merge it, if possible...

Kevin Niedermayr
Kevin Niedermayr
3,072 Points

I hope I get it right, but that's the case of git. If it's a remote repository (e.g. hosted on Github) you can pull all the changes he made, compare the changes and adapt them if you want. Commit yours and you'll be done.

Merging would only make sense if you check out in a new branch, for example „Project A_featuretest“ and if you work on your seperate branch (so that changes which destroy anything won't affect on the "real" branch „Project A“. And if you want to implement your changes in „Project A“ and everything went good so far, you can merge "Project A_featuretest" and "Project A".

ah yeah.. that's make sense now.. thanks !

Kevin Niedermayr
Kevin Niedermayr
3,072 Points

Glad it helped, you're welcome.