- Go to the assignment repository.
- Click Fork in the upper right hand of the repo
Now you should see the repo is under your personal account
- Clone down the repo in terminal in your hoemwork folder using a command simliar to this:
git clone https://git.generalassemb.ly/wsutton/hw1-cli/
One exception: Obviously, you are not wsutton, so in that part of the command you'll put your own username.
- Complete the work, add files, etc.
Go back to the root of your repository, so that you are the folder hw1-cli
:
"Add" your changes (prepare them to be "committed"):
$ git add .
"Commit" your changes—any time you make a commit, you can always restore the files in the repo to that point:
$ git commit -m "Completed homework assignment"
"Push" your commits to github:
$ git push origin main
-
Now navigate to your forked repository.
-
At the top you see the two dropdowns that allow you to pick what repo you want to use to make a pull request as well as which repo to make that request to. You need to click on
compare across forks
to show your forked copy. -
Switch to the appropriate repos. (On the left, the original repo. On the right, your forked branch).
-
Now click "Create Pull Request"
-
In the 'title' field simply write your name.
-
In the description area, fill this out to let us know how it went for you:
Comfort score: (1-5)
Completeness score: (1-5)
Questions? Comments? Add them here:
- Then hit
Create pull requests
and you are done!
No worries! This happens all the time, and if you try to push to one of our organization's repositories, you'll probably get a message that says something along the lines of "Fatal: Access to url
denied." If you need to change the remote repository associated with your local git repository, just use the following steps:
- Fork the repo to your own account and copy the SSH URL. It should have your username instead of flex-323 in the URL.
- Copy out any the files you created to your desktop.
- On your computer, delete the original repository.
- Now clone down the repo that you forked.
- Copy the files from you desktop into the new repo on your computer, then add commit and push and complete the pull request steps.