Last active
December 29, 2015 01:39
-
-
Save erlinis/7594874 to your computer and use it in GitHub Desktop.
Guide to check/accept one pull requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1: Add a remote repository | |
$ git remote add <remote name> <url> | |
$ git remote add ricardo [email protected]:ricbermo/share.git | |
Sept 2: Fetch all the data (branchs) of remote repository | |
$ git fetch <remote name> | |
$ git fetch ricardo | |
* Command to list all the remote branch | |
$ git branch -r | |
Step 3: Create a new local branch to track remote branch that want to test | |
$ git checkout -b <name local branch> <remote_name>/<name remote branch to test> | |
$ git checkout -b ricardo_fixing_bug_in_appeals ricardo/fixing_bug_in_appeals | |
* Git output will tell what remote branch is tracking the new local branch: | |
Branch ricardo_fixing_bug_in_appeals set up to track remote branch fixing_bug_in_appeals from ricardo. | |
Switched to a new branch 'ricardo_fixing_bug_in_appeals' | |
====================================================================================================== | |
Note: A good convention would be <name local branch> = <remote name>_<name remote branch to test> | |
to easily identify which branch belongs to which remote repository | |
====================================================================================================== | |
Step 4: Execute (inside of the new branch) | |
$ bundle => to install gems | |
$ rake db:create => to create a database if it doesn't exist | |
$ rake db:migrate => to update database tables | |
$ rake db:test:prepare => to set up database for tests | |
$ bundle exec rspec spec/ => to execute tests | |
$ rails s => to start the server and see the fixing or new features in action | |
Check the code | |
If everything was ok, and the changes are going to be accepted | |
Step 5: Fecth and merge | |
$ git pull --rebase | |
== Usar un branch para mezclar cambios === | |
Copiar los cambios de master en 'Ricardo Simple Form' | |
➜ skynet git:(ricardo_simple_form) git rebase master | |
➜ skynet git:(d87c554) ✗ git rebase --continue | |
Una vez el branch esta mezclado y los conflictos fueron solucionados, | |
copiar todo los cambios de este branch en master, para que quede actualizado. | |
➜ skynet git:(ricardo_simple_form) gco master | |
➜ skynet git:(master) git rebase ricardo_simple_form | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment