-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the DJH wiki!
Setup Enviornment:
Navigate to https://git-scm.com/downloads.
Download and install git (the default settings in the install is fine).
Open up git bash that you just installed.
Navigate to where you want your workspace to be (use cd to change directory and pwd to see where you are).
Jacob@JacobLaptop MINGW64 ~
$ pwd
/c/Users/Jacob
Jacob@JacobLaptop MINGW64 ~
$ cd ..
Jacob@JacobLaptop MINGW64 /c/Users
$ cd ..
Jacob@JacobLaptop MINGW64 /c
$ cd dev
Jacob@JacobLaptop MINGW64 /c/dev
$ cd school/
Jacob@JacobLaptop MINGW64 /c/dev/school
$
Once you are in your workspace directory you need to fork the project, you do this by clicking the fork button at the top of this page.
You then need to clone your fork of the repo to your computer. You do this by using the clone command:
$ git clone https://github.com/YourUsername/DJH.git
You should see something like this:
Jacob@JacobLaptop MINGW64 /c/dev/school
$ git clone https://github.com/SirJackovich/DJH.git
Cloning into 'DJH'...
Username for 'https://github.com': SirJackovich
Password for 'https://SirJackovich@github.com':
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 0), reused 6 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), done.
Checking connectivity... done.
Jacob@JacobLaptop MINGW64 /c/dev/school
$
Now you should have the repo copied to your computer.
Set your username:
git config --global user.name "Jacob Reid"
Set your email:
git config --global user.email "reidwjacob@gmail.com"
Set your remotes:
git remote -v
# origin https://github.com/YOUR_USERNAME/DJH.git (fetch)
# origin https://github.com/YOUR_USERNAME/DJH.git (push)
Type git remote add upstream and then paste https://github.com/TeamDJH/DJH.git and press Enter. It will look like this:
git remote add upstream https://github.com/TeamDJH/DJH.git
To verify the new upstream repository you've specified for your fork, type git remote -v again. You should see the URL for your fork as origin, and the URL for the original repository as upstream.
git remote -v
# origin https://github.com/YOUR_USERNAME/DJH.git (fetch)
# origin https://github.com/YOUR_USERNAME/DJH.git (push)
# upstream https://github.com/TeamDJH/DJH.git (fetch)
# upstream https://github.com/TeamDJH/DJH.git (push)
Making Changes:
Edit files then when you are ready to save the changes you have made do:
git status
Add any files you have edited using:
git add filename
Once all the files you have edited have been added make a commit:
git commit -m "Description of changes you made"
Once you are ready to share all of the changes you have made push your changes to your fork of the repo:
git push origin master
Once you have pushed your commits to your fork make a pull request on GitHub and I will merge them with the master repo.
Pulling changes from the master repo:
You should pull changes from the master repo before you start making any local changes.
Pull the changes:
git fetch upstream
Merge the changes:
git merge upstream/master
Push changes to your fork:
git push origin master