Posts Tagged ‘git’

Feb 08

Here is the problem, you need to merge some works from “stable” branch in “repo1″ to your current “master” branch. Below are the steps you do.
First of all, add a remote repository

git remote add foo git@example.com:foo/repo1.git

then download objects and refs from that newly added remote repository

git fetch foo

now checkout the branch which will you merge

git checkout --track -b stable foo/stable

swith to “stable” branch and check that everything is good to go

git checkout stable

then you move back to your current directory