Thursday, March 16, 2017

More Git Tips

##### To include (e.g. "add") in what will be committed
git add

##### Determine your current branch and display local branches
git branch

##### Create a new local branch and switch to it
git checkout -b

Where "BN" is "engineer//" (example)
NOTE: git apparently doesn't like like branch names with leading "/" characters

##### Switch to an existing branch using checkout command
git checkout

##### To discard changes in the working directory to an individual file
git checkout --

##### To commit to current branch with comment
git commit -m ""

##### To show commit history on a branch, use variations of this base command
git log

##### To merge from one branch to another, use this base command
##### The command below merges the specified branch into the current branch
git merge

##### To push local branch up to the origin repo, use this base command
git push

##### Determine your Git status (what branch, untracked files, etc.)
git status