Information Technology Reference
In-Depth Information
10-8. Accepting contributions
Problem
You are a leader of a project. A member of your team pushed some code to the shared
repository using the new-web-interface branch. You are to inspect the contrib-
uted code. In this recipe we suppose that the code is correct and you (you are the lead-
er, remember) accept it.
In this recipe we are using the scenario from Recipe 10-7. You act as a leader work-
ing in leaders-repo .
Solution
Copy the all the repositories from Recipe 10-7:
$ cd git-recipes
$ cp -R 10-07 10-08
$ cd 10-08
Now you are a leader and you inspect the contributions in the new-web-inter-
face branch (all the commands should be issued in 10-08/leaders-repo ):
1. You fetch the contributions: $ git fetch
2. You checkout the remote branch $ git checkout new-web-in-
terface
3. You inspect the files with the arbitrary commands and tools, for example,
$ ls , $ cat a.txt , vi b.txt
4. You inspect the revisions with arbitrary commands, for example, $ git
log --oneline , $ git log --oneline --name-only
HEAD 3..HEAD
5. You decide that the code is correct and should be merged into master
branch.
6. You checkout the master branch: $ git checkout master
Search WWH ::




Custom Search