--global user.name "[name]" $ git config --global user.email "[email]" This information is used to “author” your commits IMPORTANT: The commit email address is used to attribute commits to your GitHub user. Make sure you add your email address to your GitHub profile.
--global user.name "[name]" $ git config --global user.email "[email]" This information is used to “author” your commits [user] name = Andrew Turner email = [email protected] ~/.gitconfig
auto Autocorrect typos WARNING: You called a Git command named 'statis', which does not exist. Continuing under the assumption that you meant 'status'... $ git config --global help.autocorrect 1
$ git clone <url> [project-name] Duplicate a existing repository in your current working directory $ git init [project-name] Initializes a new git repository in your current working directory
new branch from your current HEAD, but does not activate it $ git checkout -b <new-branch—name> Creates a new branch from your current HEAD and makes it your active branch Switching to an existing branch $ git checkout <branch-name> Sets your working directory to the the specified branch name
master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: README.md no changes added to commit (use "git add" and/or "git commit -a") $ git status ## master…origin/master M README.md $ git status -sb
--- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ npm install npm run init-project ``` -_The `init-project` command checks for docker dependancies, creates a new docker-machine VM (if it doesn't exist), sets a local `.host` file with the docker machine's IP address, and builds the docker images._ +_The `init-project` command checks for docker dependencies, creates a new docker-machine VM (if it doesn't exist), sets a local `.host` file with the docker machine's IP address, and builds the docker images._ ### Running the Application To start the application, simply run the following command: $ git diff [path|file] See what code has changed
--- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ npm install npm run init-project ``` -_The `init-project` command checks for docker dependancies, creates a new docker-machine VM (if it doesn't exist), sets a local `.host` file with the docker machine's IP address, and builds the docker images._ +_The `init-project` command checks for docker dependencies, creates a new docker-machine VM (if it doesn't exist), sets a local `.host` file with the docker machine's IP address, and builds the docker images._ ### Running the Application To start the application, simply run the following command: $ git diff [path|file] diff --git a/README.md b/README.md index dfa025c..2de90d0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ npm install npm run init-project ``` _The `init-project` command checks for docker [-dependancies,-]{+dependencies,+} creates a new docker-machine VM (if it doesn't exist), sets a local `.host` file with the docker machine's IP address, and builds the docker images._ ### Running the Application To start the application, simply run the following command: $ git diff --word-diff [path|file]
to the index (will be included in next commit) $ git add -i Interactively stage files or parts of a file Unstage files $ git reset HEAD -- [path|file] Removes files from the index (will not be included in next commit)
for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Your branch is up-to-date with 'origin/master'. # # Changes to be committed: # modified: README.md # $ git commit $ git commit -m 'an awesome commit message'
for new commits and merge into current branch $ git fetch origin [branch] $ git pull origin [branch] This does not get the changes, just checks for new commits