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 Pull
Always pull before commit the data.
For pull, right click in the git repository.
Go to TortoiseGit
Click on Pull
Click on OK
If get success message, click on close
If get any error message, go to GIT Pull Error section
Compare Changes
Right click in the git repository.
Go to TortoiseGit
Click on Diff
It will display new, missing or modified files.
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
Click on Git Commit
Select files that should be commit
Click on All, if want to commit all files
Write Commit Message
Select Commit and Push
If success fully push, success message will display.
Click on 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
Click Ok
Pull will be rejected. Error message will also show the file name which has issue
Take backup of the file
Go to the repo folder->(right click) TortoiseGIT -> Revert
Select (checkbox) the file -> Click Ok
Pull again
GIT Push Error
Push error comes when you try to push without taking pull.
Commit and Push your files
Push rejected
Take backup of your files or whole repo folder.
Go to repo folder -> (right click) TortoiseGIT -> Show Log
origin/master and master will be on different commits as your changes are not pushed to server
right click on origin/master commit -> Reset "master" to this..
Click Ok
Reset will be success
Take pull and then check log by right clicking in repo folder -> TortoiseGIT -> Show Log. You will see someone has committed.
Add your changes to repo folder from backup then again Commit & Push