-
(first time setup) clone the repository
git clone https://github.com/dryu99/infinite-animal-crossing-lofi.git
-
check out a new branch
git checkout -b NAME-OF-BRANCH
- it should look like this:
- checking out a new branch means that you're working on a different version
- like a paper - this means you're working on a draft involving one idea for the final paper
- you don't want to work on the idea directly on the final paper but rather on a draft
- if you don't use the "draft" having branches makes it easier to not include it
- if you do use the "draft" you can easily put it in the final paper - master
-
make your changes, go wild!
- you can add something to the README or do some code!
-
tell git to track your changes by doing
git add .
- try to do this in the beginning before you start making any changes
git add .
will add ALL changes; you can add only some changes by specifying a file instead of.
-
save your changes and give it a meaningful name by doing
git commit -m "describe your changes here"
-
double check to see what git is keeping track of by doing
git status
-
push those changes up to github
git push origin NAME-OF-BRANCH
-
go to github and make a pull request!
-
merge it into master branch
- help! what do i do if my git says "failed to push some refs to origin"
- you wanna pull your changes and do
git pull origin master
- you wanna pull your changes and do
- help! i wanna revert to an earlier version!
- find the last time you saved your work by doing
git log
and keep track of the hash - then
git reset --hard <hash>
- find the last time you saved your work by doing
- how do i update my local version to be up to date with github?
git pull origin NAME-OF-BRANCH
will update the a specific branch
- how do i switch branches?
git checkout NAME-OF-BRANCH
- not including spaces between your commands
gitcommit
vsgit commit
- not pushing or pulling your repository
- not pulling -this means that you aren't working on the latest version of the project
- not pushing - that means you haven't uploaded the latest version of the project
- working on the wrong branch
- you meant to do it in branch A but you did it in branch B
- check which branch you're on in git
- working on the master directly (if there are multiple people working or different versions)
- similarly to a paper, it would be as if you're working on the final paper rather than a draft