A Guide to Git & GitHub

In this course we will be learning about version control especially Git and GitHub which provides hosting for Git version control.

Git commit

You have one file index.html and in order to start tracking the file you can use git add command.

Add our project file/s to repository.

Run below command to add file to version control and start tracking.

$ git add index.html

You should see,

On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
	new file:   index.html

This means the file index.html is staged.

You can commit the changes you've made by command

git commit -m "First Commit"

You should see,

[master (root-commit) 0746f1f] First Commit
 1 file changed, 1 insertion(+)
 create mode 100644 index.html

If you again run the git status command,

$ git status

You should see,

On branch master
nothing to commit, working tree clean


Previous Next

Unlock Your Potential with Engineeous

Get Started