-
In Terminal, verify that you have git installed.
which git
If the above command doesn't result in a listed directory, download git.
Open the Self Service application on your machine and log in.
On the Categories
panel on the right hand side, select Scripts > Make Me an Admin
Run the git installer.
-
On github, find the repo you want and fork it to your own github account.
https://github.com/gopro/some-repo
-
Copy the URL for the forked repo on your account.
https://github.com/youraccount/some-repo
-
In Terminal, create a directory where to store all of your local cloned repos.
mkdir repo
-
Navigate to that directory and clone your forked repo.
cd repo git clone https://github.com/youraccount/some-repo
-
Navigate into the resulting directory.
cd some-repo
-
Add the original GoPro repo as a remote upstream repo for rebasing.
git remote add upstream https://github.com/gopro/some-repo
If you run git remote -v
to list remotes, you should now be able to see both your fork (origin
) and the original repo (upstream
).
- Create a new branch for the work you're about to do with
git checkout -b [branch_name]
- Open the file you want to edit in the text editor you like. I prefer Sublime. Visual Studio Code offers markdown preview.
- When you're done editing, save the file.
- From the repo directory in Terminal, see which files contain changes by typing
git status
. - Add those files to your commit with
git add file1.md file2.md file3.md
- Make your commit with
git commit
, which will open Vim. - Type
i
to enter 'insert' mode. Type a short commit message that describes the changes you made, like "Removed section on roles." - Press
ESC
to exit 'insert' mode, type:wq
and hitEnter
towrite
andquit
.
- Run
git pull --rebase upstream master
to rebase from the original repo. This ensures that your local cloned repo captures any changes made in the original since you began working. - Push your changes to a new branch on your forked repo on github, with
git push origin [branch_name]
. - On Github, submit a Pull Request (PR) from the
[branch_name]
branch of your forked repo to theMaster
branch of the original repo. - Ask a teammate to review and merge your PR.
This is a test. Don't panic, if it were actually important, it would say something.