-
Notifications
You must be signed in to change notification settings - Fork 34
How to Submit a Pull Request
David Keiser-Clark edited this page Dec 13, 2018
·
1 revision
-
Summary: when you're working on a topic/bug/fix/enhancement you will want to create a new branch "from master" so you
git branch <helpful name>
,git checkout <helpful name>
add your work to that branch, then when you want it to go back to your repogit push origin <helpful name>
so it goes to YOUR repo. Once you do that it should give you a** URL to perform the PR if you're ready**. Note: If you don't push to origin it won't move your local machine branch to origin. - Remote Origin: https://github.com/Islandora-Collaboration-Group/ISLE-Documentation
- My fork: https://github.com/dwk2/ISLE-Documentation
- Create a local clone (laptop):
git clone https://github.com/dwk2/ISLE-Documentation.git
Checkout the master
branch of your local repo, fetch all remotes, pull the upstream master
, and push it back to your forked repo
-
git status
-
git branch
-
git checkout master
-
git remote -v
- origin https://github.com/dwk2/ISLE-Documentation.git (fetch)
- origin https://github.com/dwk2/ISLE-Documentation.git (push)
- upstream https://github.com/Islandora-Collaboration-Group/ISLE-Documentation.git (fetch)
- upstream https://github.com/Islandora-Collaboration-Group/ISLE-Documentation.git (push)
-
git fetch --all
-
Update all of my pointers so git is aware of all the branches both local and in the ISLE-DOC origin
- Fetching origin
- Fetching upstream
-
Update all of my pointers so git is aware of all the branches both local and in the ISLE-DOC origin
-
git pull upstream master
- From https://github.com/Islandora-Collaboration-Group/ISLE-Documentation
- * branch master -> FETCH_HEAD
- Updating 1f8e5ae..3631347
- Fast-forward
- README.md | 2 +-
- .../install_docker_for_mac.md | 12 +-
- .../server-requirements.md | 77 +++
- .../software-dependencies.md | 326 +++++++++
- (etc: there may be a lot of objects to update)
-
git push
- Counting objects: 180, done.
- Delta compression using up to 4 threads.
- Compressing objects: 100% (74/74), done.
- Writing objects: 100% (180/180), 62.39 KiB | 7.80 MiB/s, done.
- Total 180 (delta 120), reused 161 (delta 106)
- remote: Resolving deltas: 100% (120/120), completed with 16 local objects.
- To https://github.com/dwk2/ISLE-Documentation.git
- 1f8e5ae..3631347 master -> master
-
CREATE NEW BRANCH from
master
branch for making our desired changes; SWITCH to this new branch- usage:
git branch NAME-YYYYMMDD-NAME-OF-UPDATE
- example:
git branch dwk2-20181207-cookbook-docker-cheatsheet
- usage:
-
SWITCH to this new branch
- usage:
git checkout NAME-YYYYMMDD-NAME-OF-UPDATE
- example:
git checkout dwk2-20181207-cookbook-docker-cheatsheet
- usage:
-
DO YOUR WORK ON THIS BRANCH
-
git status
- On branch dwk2-20181207-cookbook-docker-cheatsheet
- Untracked files:
- (use "git add ..." to include in what will be committed)
- docs/07_appendices/isle-cheatsheet-docker-commands.md
- nothing added to commit but untracked files present (use "git add" to track)
-
git add -A
- add all files
-
git status
- On branch dwk2-20181207-cookbook-docker-cheatsheet
- Changes to be committed:
- (use "git reset HEAD ..." to unstage)
- new file: docs/07_appendices/isle-cheatsheet-docker-commands.md
-
COMMIT YOUR WORK
- usage:
git commit -m "TYPE OF UPDATE NAME_OF_UPDATE"
- example: `git commit -m "cookbook for ISLE Cheat Sheet: Docker commands"
- 1 file changed, 144 insertions(+)
- create mode 100644 docs/07_appendices/isle-cheatsheet-docker-commands.md`
- usage:
-
git branch
- should still be on your new working branch
-
PUSH NEW BRANCH TO ORIGIN
- usage:
git push origin NAME-YYYYMMDD-NAME-OF-UPDATE
- example:
git push origin dwk2-20181207-cookbook-docker-cheatsheet
- Counting objects: 5, done.
- Delta compression using up to 4 threads.
- Compressing objects: 100% (5/5), done.
- Writing objects: 100% (5/5), 1.99 KiB | 1.99 MiB/s, done.
- Total 5 (delta 3), reused 0 (delta 0)
- remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
- remote:
- remote: Create a pull request for 'dwk2-20181207-cookbook-docker-cheatsheet' on GitHub by visiting:
- remote: https://github.com/dwk2/ISLE-Documentation/pull/new/dwk2-20181207-cookbook-docker-cheatsheet
- remote:
- To https://github.com/dwk2/ISLE-Documentation.git
-
- [new branch] dwk2-20181207-cookbook-docker-cheatsheet -> dwk2-20181207-cookbook-docker-cheatsheet
- usage:
-
git status
-
git checkout master
-
git status
-
DONE!