Git & GitHub

Here we will find information about Git & GitHub.

Basic Git Vocabulary

  • Repository = Where Git save all the: files, history, and data of the Project.
  • Working Directory = Folder location in PC.
  • Staging Changes = Choosing what Changes we want to commit, and what to ignore.
  • Commit = The ACT of save the changes to Git.
  • Push = Saving: Changes in repository to
  • pull = Download the Lattes changes from and update our Local Repository.
  • Clone a Repository: Download an existing Repository to your PC.


For the LINK  —  LINK2

Git Commands:

Restore files back to last commit:

Clone a Repository:

Set Own Repository on Cloned Repository:

To get help on any command: command + –help

To stop tracking changes on a Local repository:

Review recent statistics changes.

Stop viewing “git log”

press ” q ”

Getting Colored Output

Git Ignore:

Create a file named: ” .gitignore  ” in the main working directory and here where you will list the files and folders that you don’t want to Commit or Push, and here is an example of the file, here Im ignoring the folder: “node_modules” and the file “myNotes.txt” I also add a link where you can find more help about how to configure this file.

and this is how you can ignore files and folders from been Push to GitHub.

Remove a folder pushed by mistake:



Compare two  Logs ID’s

Compare Working Directory with Staging Area

Compare the Staging area doc with repository

Clone: copy all the repository with all the History. not just files.

Temporary restore previous version

Style the Terminal (Colors) instructions:

Links:  Udacity


To know in what branch we are:

To create a new branch, just add an argument

Now if you check in what branch we are, you will see that we are working on the branch “master”

To change working branch

Now we can do changes to the files on a new and separate branch.

you can create a branch and change to work in that branch in a single command.


Wen working with branches in the same computer, you should use different folders (directory location). to see who did what, “$ git log 

To visualize Git Log:

To delete a branch.


To merge two branches

To find what is the parent of a commit after a merge, without know what commit is the parent.






Copyright 2017. All rights reserved.

Posted February 1, 2017 by Edmundo in category "FED