rsnt_translations
56,573
edits
m (Update git command for pushing code) |
No edit summary |
||
Line 5: | Line 5: | ||
[https://en.wikipedia.org/wiki/Git Git] is a distributed, fast and secure source code management tool. The official Git website is [http://gitscm.org gitscm.org]. The Git software was initially created by [http://en.wikipedia.org/wiki/Linus_Torvalds Linus Torvalds] for the Linux project and the current maintainer is [http://en.wikipedia.org/wiki/Junio_Hamano Junio Hamano]. The development of Git itself is performed on the [https://git.wiki.kernel.org/index.php/Main_Page kernel.org] platform. | [https://en.wikipedia.org/wiki/Git Git] is a distributed, fast and secure source code management tool. The official Git website is [http://gitscm.org gitscm.org]. The Git software was initially created by [http://en.wikipedia.org/wiki/Linus_Torvalds Linus Torvalds] for the Linux project and the current maintainer is [http://en.wikipedia.org/wiki/Junio_Hamano Junio Hamano]. The development of Git itself is performed on the [https://git.wiki.kernel.org/index.php/Main_Page kernel.org] platform. | ||
== Operating | == Operating principle == <!--T:2--> | ||
Contrary to older source code management tools, Git works in a distributed way. This means that developers do not depend on a central repository to commit their changes. Each Git repository contains the full history of the project. Each Git object (changeset, file, directory) is the leaf of a tree with multiple branches. Developing a project with Git is based on a model in which one branch corresponds to one feature. Many revisions of the feature may be archived before the branch gets merged with the main trunk. For a detailed explanation of branch development, we recommend reading [http://nvie.com/posts/a-successful-git-branching-model/ this page]. | Contrary to older source code management tools, Git works in a distributed way. This means that developers do not depend on a central repository to commit their changes. Each Git repository contains the full history of the project. Each Git object (changeset, file, directory) is the leaf of a tree with multiple branches. Developing a project with Git is based on a model in which one branch corresponds to one feature. Many revisions of the feature may be archived before the branch gets merged with the main trunk. For a detailed explanation of branch development, we recommend reading [http://nvie.com/posts/a-successful-git-branching-model/ this page]. | ||
Line 147: | Line 147: | ||
== Creating or cloning a repository == <!--T:12--> | == Creating or cloning a repository == <!--T:12--> | ||
The first step usually | The first step is usually to create your own repository, or to clone an existing one. | ||
<!--T:13--> | <!--T:13--> | ||
Line 158: | Line 158: | ||
== Commiting a change == <!--T:15--> | == Commiting a change == <!--T:15--> | ||
When the repository is ready, you change directory and edit the file | When the repository is ready, you change directory and edit the file. | ||
{{Commands | {{Commands | ||
| cd my-project | | cd my-project | ||
Line 165: | Line 165: | ||
<!--T:16--> | <!--T:16--> | ||
When work is done, you add the file | When work is done, you add the file | ||
{{Command| git add file.txt}} | {{Command| git add file.txt}} | ||
and commit the change | and commit the change | ||
Line 171: | Line 171: | ||
<!--T:17--> | <!--T:17--> | ||
It is then possible to push changes to the origin repository with | It is then possible to push changes to the origin repository with | ||
{{Command| git push origin main}} | {{Command| git push origin main}} | ||