This repository was archived by the owner on Jul 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Github Resources
Dylan Christopherson edited this page Jul 16, 2018
·
11 revisions
Download the E-book from the left side of the page:
https://git-scm.com/book/en/v2
A google slides power point:
https://docs.google.com/presentation/d/1lr-HGI_YGprGQ5FHvaaTrN5oMY-Sfq4yWpWTOq1WSO4/edit#slide=id.p
An interesting youtube tutorial. Explains basic concepts extremely well:
https://www.youtube.com/watch?v=BCQHnlnPusY
Github Commands:
git config --global user.name "username"
git config --global user.email [email protected]
git config --list
git init //Create a directory, cd into the directory and run this command
rm -rf .git //Revereses the git init command
git clone "web_link.git"
git log <optional> //You can use -2 at optional to show the last two commits
git remote
git remote -v
git remote add origin [email protected]:dylanchristopherson/Arduino_code.git //An example
git remote rm origin //Removes a remote
git status
git mv README.md README //Renames a file
git branch <branchName> //Creates a new branch
git checkout <branchName> //Switches to branch
git checkout -b <branchName> //Create and checkout new branch
git branch -d <branchName> //Deletes branch
git merge <branchName> //Make sure you checkout master first so you merge <branchName> into master
//After git merge, conflicts may pop up
git status
git branch //Tells you working branch
git branch -v
git branch --merged //OR --no-merged
git add . //Adds all files for staging
git commit -a -m "Message"
git push origin master
git push origin HEAD //HEAD refers to the top of the current branch (The branch you're using)
git pull origin master //Pulls updates from github
//OR
git fetch master
git merge master //First fetch and then merge from github
git remote add origin "web_link.git"