WGU Version Control - D197
QUESTIONS AND ANSWERS | lATEST
II II II II II II
$ git config --global user.name "Your Name"
II II II II II II II II II II II
Set the name that will be attached to your commits and tags.
II II II II II
$ git config --global user.email "you@example.com"
II II II II II II II II II II II II
Set the e-mail address that will be attached to your commits and tags.
II II II II II
$ git config --global color.ui auto
II II II II II
Enable some colorization of Git output.
II II II II
$ git init [project name] II II II II II II II II II II II
Create a new local repository. If [project name] is provided, Git will
II II II II II II II II II II
create a new directory name [project name] and will initialize a II II II II II II II II II II II
repository inside it. If [project name] is not provided, then a new II II II II II II
repository is initialized in the current directory.
II II II II
$ git clone [project url] II II II II II II II II II II
Downloads a project with the entire history from the remote repository.
II II
$ git status II II II II II II II II II
Displays the status of your working directory. Options include new,
II II II II II II II II II II
staged, and modified files. It will retrieve branch name, current commit
II II II II
identifier, and changes pending commit.
II II II
$ git add [file]
II II II II II II II II II II II II II II II II II
Add a file to the staging area. Use in place of the full file path to add all
II II II II II II II II II II
changed files from the current directory down into the directory tree.
II II II
$ git diff [file]II II II II II II II
Show changes between working directory and staging area.
II II II II
$ git diff --staged [file] II II II II II II II II II
Shows any changes between the staging area and the repository.
II II II II
$ git checkout -- [file] II II II II II II II II
Discard changes in working directory. This operation is unrecovera-ble.
II II II
$ git reset [file] II II II II II II II II
Revert your repository to a previous known working state.
II II
$ git commit II II II II II II II II II II
Create a new commit from changes added to the staging area.
II II II II II
The commit must have a message!
II II II
$ git rm [file] II II II II II II II
Remove file from working directory and staging area.
II II
$ git stash
II II II II II II II II II II II
Put current changes in your working directory into stash for later use.
II II II
$ git stash pop II II II II II II II II II
Apply stored stash content into working directory, and clear stash.
II II II
$ git stash drop II II II II II II II II
Delete a specific stash from all your previous stashes.
II II II
$ git branch [-a]
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller STUVATE. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.