Git: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Wrote article on Git |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1:
'''Git''' is an open source [[W:Version Control System|Version Control System]] made by Linus Torvalds in 2005. It is one of the most well known and popular among version control systems.
== Information ==
Oftentimes when working on a hobby operating system, files end up being lost or broken, and having a backup of an older version is useful. Git (not to be confused with [[
== Features ==
Line 8:
== History ==
Git was initially developed in 2005 by [
== Git vs. GitHub ==
[
It's a common mistake for developers new to Git (and programming in general) to not understand the difference between Git and GitHub, however the difference should be recognised.
Line 20:
Firstly, cloning a repository, which is basically downloading a remote repository to your own machine. To do so, run the following command in your terminal:<syntaxhighlight lang="bash">
git clone [URL of repository]
</syntaxhighlight>To push updates made from a local machine to a remote repository, there are three commands needed. You must be in the directory of the project to run these. Firstly, you must stage all changes made to the repository:<syntaxhighlight lang="bash">
git add .
</syntaxhighlight>Now, you can make a commit message, which is a short single-line comment on the changes made. Often repositories will have a specific structure for commit messages that you must adhere to. To do so, run:<syntaxhighlight lang="bash">
git commit -m "[COMMIT MESSAGE]"
</syntaxhighlight>Finally, push the updates to the remote repository:<syntaxhighlight lang="bash">
git push
</syntaxhighlight>Note that these instructions expect that you created the repository. There will be additional steps such as forking the repository and making a pull request when you are contributing to somebody else's repository. This also expects that you are pushing to the main branch.
== See also ==
* [
* [https://git-scm.com/ Git Homepage]
* [
[[Category:Tools]]
|