Flashcards in GIT Deck (46):
What is a KEY skill in learning how to code?
Knowing how to manage the changes I make
What is a benefit of Git?
Makes controlling the different versions of my code easier for me and my team
What are 4 very high level tasks of what a coder does daily?
1. Create things
2. Save things
3. Edit things
4. Save the thing again
How does version control help me as a coder that saves things again and again?
It helps me track
1. When I saved a change
2. Why I saved a change
3. What the contents of the change was
4. Who was the person that made the change
What is Version Control?
It is a History Tracking program
When is Version Control truly the most beneficial?
When I am working on a collaboration on the same things and the same files
What does the tool "merge" allow me to do?
Allows 2 simultaneous changes from me and someone else to be merged into a unified and resolved, good and final state
What does Git's Version Control bring to the table as benefits?
1. Very lightweight and modern implementation of a version control
2. Very fast
3. Provides a history of content change
4. Facilitates collaborative file changes
5. Easy for any type of knowledge workers
Git is a distributed _____ _____ system.
Command for initializing a empty Git repository?
What is a Git Repository?
A hidden directory where Git operates
What is the command to see the current status of my Git project?
What does "untracked" signal in Git?
That the "untracked" file is new to Git and needs to be added to the staging area so it can be tracked
How do I add a file to the Git "staging area?"
"git add filename.txt" command
Are files located in Git's "Staging Area" in the "Repository" yet?
How does one store the "Staged" changes in the "Repository?"
Run the "commit" command
git commit -m "Add cute octocat story"
What can I use when I want to add many files of the same type to Git's "Repository?"
git add '*.txt'
What is the command to commit to all changes made?
git command -m 'Add all the txt files'
What is 'git log' command?
It is a journal command that remembers all of the changes I have committed to in the order they were committed to.
How can I add a local "Repository" folder to the GitHub server?
Add a remote "Repository" folder on GitHub's website
What is and example of the command I would use to add a remote "Repository" folder to GitHub?
git remote add origin https://github.com/try-git/try_git.git
What does the "push command" tell Git?
Where to place my local commit changes in the remote Git folder
What does "origin" tell us in this command "git push -u origin master"
The name of the Git "remote"
What is the default local branch name on Git remote?
What does the "-u" tell us in the command "git push -u origin master"
Tells Git to remember the parameters so that next time we can simply run "git push" and Git will know what to do
What is the command to "push" my local commits to remote Git?
git push -u origin master
How can I check for changes made in the GitHub repository and also pull down the changes made on my local repository?
Run the "git pull origin master" command
How can I look at what is different from my last "commit?"
Run command "git diff HEAD"
What does the "HEAD" portion of the command "git diff HEAD" tell my computer?
When I am asking for the differences of my most recent commit
What are "staged files?"
Files I have told Git that I am ready to be committed to
A great use for differences (diff) is looking at changes made within files that have already been _____.
What command would I use to "stage" (commit) files to a repository?
"git add octofamily/octodog.txt"
What does the "git diff --staged" command tell the computer
To show me the changes that I have recently "staged" (committed to)
How can I tell the computer to "unstage" files?
Using the "git reset" command.
"git reset octofamily/octodog.txt"
Is a file deleted when it has been "unstaged?"
No, the file is still there it is just not staged
How can I change things back to how they were at the last "commit?"
Run the "git checkout -- " command.
"git checkout -- octocat.txt"
What does the term "branch" mean to a developer?
What is helpful for developers to do when working on a feature or a bug?
Create a "branch" or copy of their code so they can make separate "commits" to
How can I create a "branch?"
With command "git branch "
"git branch clean_up"
How can I see what my local "branches" are?
With command "git branch"
How can I switch the "branch" I am working in?
Using the "git checkout " command
"git checkout clean_up"
What does the "git rm
''" command tell my computer?
1. "Stage" the removal of files
2. Remove actual files from the disk
How can I check the changes I am about to "commit" to?
Run "git status" command
What command do I use to commit to the changes I want to make?
"git commit -m "my label of the changes I am committing to"
"git commit -m "Remove all the cats"
What are the steps to copy (merge) changes made in the non-Master branch?
1. Switch to the "master" branch using
"git checkout master" command
2. Merge the changes to the master branch with the "git merge "
"git merge clean_up"
3. Delete the non-master branch folder with command "git branch -d "
"git branch -d clean_up"