Merging Changes From Github
To merge in changes Rails Machine has made to your code at Git Hub, please follow these instructions
- First, commit or stash any changes in your index. The following steps need to be performed in a clean working directory.
git status
# On branch master
nothing to commit (working directory clean)
- Next, you’ll add a remote for Rails Machine’s fork of your repository and fetch the latest changes
git remote add railsmachine git@github.com:railsmachine/your_repo.git git fetch railsmachine
- Now, merge railsmachine’s changes back into master (or whichever branch you prefer to deploy from) and push.
git checkout master # switch to the 'master' branch
git diff ..railsmachine/master # peview the changes
git merge railsmachine/master # perform the merge
git status # ensure there are no conflicts
rake # run your test suite
git push origin master # push to your origin
- If you wanted to merge these changes into another branch called “production”, you’d perform the following steps:
git checkout production # switch to the 'production' branch
git diff ..railsmachine/master # peview the changes
git merge railsmachine/master # perform the merge
git status # ensure there are no conflicts
rake # run your test suite
git push origin production # push to your origin
Conflicts
Please refer to the git-merge documentation for a great guide to git conflict resolution.
