get consultation

Commands

Commands

There are various Git commands that are useful for tracking your project's changes.

Status

git status

This tells you if your local repository has any changes that need to be pushed to the remote server.

Git status DOES NOT tell you if there are changes in the remote server.

Git status ONLY tells you if you have changes that need to be pushed.

Pull

git pull

This command is used to pull down changes from the remote server.

NOTE: You cannot have any changes in your repository before pulling. You need to commit your changes locally first.

Push

git push

This command is used to push COMMITTED changes to the remote server.

Local Commit

gitex commit

Use the UI tool to stage your changes for local commits. You can click on the Commit button to commit your changes locally and then use git pull and git push to store them on the remote server (such as github).

Reset

git reset --hard

Attaching a Remote

git init
git remote add origin https://github.com/danvallejo/aspnetmvc1.git
git pull origin master
git push --set-upstream origin master

Links

Exercises

  1. TBD