Tortoise Git

  • Tortoise git is the user interface for git.

  • By using tortoise git we can pull the data from server and commit the data and push that data to server.

  • To perform all the git operation we should be in git repository.

  • Where .git folder exits, that is called git repository.

    GIT REPO

GIT Pull

  • Always pull before commit the data.

  • For pull, right click in the git repository.

    GIT RIGHT CLICK

  • Go to TortoiseGit

    GIT TORTOISE CLICK

  • Click on Pull

    GIT PULL CLICK

  • Click on OK

    GIT PULL OK

  • If get success message, click on close

    GIT PULL SUCCESS

  • If get any error message, go to GIT Pull Error section

Compare Changes

  • Right click in the git repository.

    GIT RIGHT CLICK

  • Go to TortoiseGit

    GIT TORTOISE CLICK

  • Click on Diff

    GIT DIFF CLICK

  • It will display new, missing or modified files.

    GIT DIFF LIST

  • If files modified, double click on file, Difference can be seen

GIT Commit and Push

  • Commit means changes will commit in respective system

  • Push means we push the changes to server

  • To commit and push data, right click in git repository

    GIT RIGHT CLICK

  • Click on Git Commit

    GIT COMMIT

  • Select files that should be commit

    GIT SELECT COMMIT

  • Click on All, if want to commit all files

    GIT SELECT ALL

  • Write Commit Message

    GIT COMMIT MESSAGE

  • Select Commit and Push

    GIT COMMIT AND PUSH

  • If success fully push, success message will display.

    GIT SUCCESS

  • Click on Close

    GIT SUCCESS CLOSE

  • If get any error message, go to GIT Push Error section

GIT Pull Error

Pull Error comes when Somebody has committed the same file on which you are working.

(right click) TortoiseGIT -> pull

Screenshot

Click Ok

Screenshot

Pull will be rejected. Error message will also show the file name which has issue

Screenshot

Take backup of the file

Go to the repo folder->(right click) TortoiseGIT -> Revert

Screenshot

Select (checkbox) the file -> Click Ok

Screenshot

Pull again

Screenshot

GIT Push Error

Push error comes when you try to push without taking pull.

Commit and Push your files

Screenshot

Push rejected

Screenshot

Take backup of your files or whole repo folder.

Go to repo folder -> (right click) TortoiseGIT -> Show Log

Screenshot

origin/master and master will be on different commits as your changes are not pushed to server

Screenshot

right click on origin/master commit -> Reset "master" to this..

Screenshot

Click Ok

Screenshot

Reset will be success

Screenshot

Take pull and then check log by right clicking in repo folder -> TortoiseGIT -> Show Log. You will see someone has committed.

Screenshot

Add your changes to repo folder from backup then again Commit & Push

Screenshot