What you should do first is to click the fork button on this repo on Github.
git clone https://github.com/YourGithubUsername/Code-LTHGit2016.gitto clone this entire repo (your fork) into a directory on your computer.git statusto check how badly things are going. If you don't know what command to run, run this one.git add .(note the period) adds all changed files to the "index", making them ready to be committed.git commit -m "Insert commit message here (including quotes)"creates a commit with the currentlyadded files.escape:q!if you're stuck in vim and don't know how to get out.git pushuploads your changes to the default remote (repo) (seegit remote --helpfor more info on that).git pullto download changes in the repo.git stashthengit pullthengit stash popif you're in the middle of changing something but still want to pull.git diffto show line changes you've made.
These aren't recommended for beginners. If you want to learn about these please ask.
- Branches. It's a bit like having multiple repos in the same repo, that you can compare and merge changes between. Or rather, repos are more like branches in different locations.
git add -iInteractive adding of changes. Lets you add only parts of files which makes it much easier to contain specific changes in a single commit.git cherry-pickFor grabbing a commit from some branch and applying on top of the current branch. Great for when you forget to branch or when you want a specific feature from another branch. This is amazing but doesn't always work the way you intend, especially with too broad commits.git reset HEAD~xUnstages thexlatest commits. If you by accident commited something that you didnt want to inclue in your commit. If you want to delete your last commit, the safe way isgit reset HEAD~1followed bygit stash. The dangerous, not recoverable way is:git reset --hard HEAD~1(Not recommended if you do not know what you are doing).