A Simple Tutorial
Last updated
Was this helpful?
Last updated
Was this helpful?
The goal of this tutorial is to give students hands-on experience in dealing with three of the most common aspects of Git - writing, staging and committing code, resolving merge conflicts, and opening pull requests.
Create a of our to your account on GitHub.
Open up a Git-enabled terminal, and the fork you've created to your computer.
into git-learning.
the HelloWorld.java
file, and replace "Hello, Conflicts!"
with another phrase of your choice.
HelloWorld.java
.
Once everyone has changed code and committed, one of the programming leads will push a commit that will cause a to the Spartronics repository. Merge conflicts are incredibly common when working collaboratively, and learning how to resolve them is an important skill.
Stage and commit your merge-resolved HelloWorld.java
file.
Now that you've dealt with your merge conflicts, the next step is to get your changes into upstream - the Spartronics organization's copy of git-learning. In a usual season, your code will also be reviewed by the subteam leads and mentors you're working with, and implement feedback accordingly.
Request review from one of the programming leads from the right sidebar.
Submit your pull request, and you're done!
Make sure you're in the git-learning directory, and (git pull upstream master
).
You should be alerted of - edit the offending file, and resolve them manually.
Make sure you're in the git-learning directory, and .
Navigate to the Spartronics4915 git-learning repository, and from your fork.