Skip to content

@pyykkis /git guide
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Guide for git branches, remotes and merge requests
# clone your fork of qa-reports from gitorious
git clone git@gitorious.org:~shaofengtang/meego-quality-assurance/release-version-qa-reports.git
# create a branch to follow upstream, i.e., qa-reports/master
git checkout -b upstream
# configure upstream repository in order to pull in new changes easily
git remote add upstream git://gitorious.org/meego-quality-assurance/qa-reports.git
git pull upstream master
# from now on, this will pull fresh origin/master to your upstream branch
git checkout upstream && git pull upstream master
# upstream test cases should always pass, otherwise there's something wrong in the environment
rake spec && rake cucumber
# start your feature development by branching from the current upstream
git checkout upstream && git pull upstream master && git checkout -b fea-my-new-awesome-feature
# do the development and all the commits
git commit ...
...
...
git commit
# write tests and check that all the tests pass
rake spec && rake cucumber
# bring your feature up-to-date with qa-reports/master by rebasing
git checkout upstream && git pull upstream master && git checkout fea-my-new-awesome-feature
git rebase upstream
# check that everything works after rebase
rake spec && rake cucumber
# now git diff with upstream should show only your changes and nothing else
git diff upstream
# -> perfect time to create a merge request! :)
# Please note that the updating upstream and rebasing your changes should be done again in case
# we request you to update the merge request.
# Please note also it's usually easier to follow upstream if you rebase your branch often,
# e.g., daily, instead of one big rebase after a week or so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.