Git is a most Distributed Version Control System (DVCS) for its speed, efficiency. When checkout code from server it creates fully mirror of original repository so it is a full backup of the repository. Thus if server dies, you can restore full data again from any client computer.
Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
Most operations in Git only need local files and resources to operate — generally no information is needed from another computer on your network.
What ever the operation takes place inside your cloned working directory (except 'push' and 'pull'), those are not depends on network or server, so user gets seed as compare to other (Source Code Management System)SCMs.
How git mange your changes as version?
Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again—just a link to the previous identical file it has already stored.

Git has three main states that your files can reside in:
1-> committed : means that the data is safely stored in your local database.
2-> staged : means that you have marked a modified file in its current version to go into your next commit snapshot.
3-> modified : means that you have changed the file but have not committed it to your database yet.

When you checkout a repository it clones all data and history of original repository from server to working directory.
Before commit your changed code user have to add all changed file into staging area.
After staging the changes, user can commit it code to main line with commit message, so other developer also get updates code and idea about your changes.
This commit process happened on your local system so other developers are not checkout your changes, so you have to push your changes into server where other can pull your updated code.
Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
Most operations in Git only need local files and resources to operate — generally no information is needed from another computer on your network.
What ever the operation takes place inside your cloned working directory (except 'push' and 'pull'), those are not depends on network or server, so user gets seed as compare to other (Source Code Management System)SCMs.
How git mange your changes as version?
Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again—just a link to the previous identical file it has already stored.
1-> committed : means that the data is safely stored in your local database.
2-> staged : means that you have marked a modified file in its current version to go into your next commit snapshot.
3-> modified : means that you have changed the file but have not committed it to your database yet.
When you checkout a repository it clones all data and history of original repository from server to working directory.
Before commit your changed code user have to add all changed file into staging area.
After staging the changes, user can commit it code to main line with commit message, so other developer also get updates code and idea about your changes.
This commit process happened on your local system so other developers are not checkout your changes, so you have to push your changes into server where other can pull your updated code.
No comments:
Post a Comment