Git: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 13: Line 13:
A repository is a nest of folders for e.g. projects and libraries. Then git is used to commit or push changes. This way git takes care of all the tracking, removing the need for keeping multiple versions of a project and any point in the development can be returned to.<ref name="iprac">[http://electronics.stackexchange.com/questions/26308/industry-practices-for-schematic-design Industry Practices for Schematic Design?]</ref><ref>[https://spin.atomicobject.com/2015/01/19/hardware-version-control/ Version-Controlled Hardware Design with EAGLE] by Jordan Schaenzle, 19 Jan 2015.</ref>
A repository is a nest of folders for e.g. projects and libraries. Then git is used to commit or push changes. This way git takes care of all the tracking, removing the need for keeping multiple versions of a project and any point in the development can be returned to.<ref name="iprac">[http://electronics.stackexchange.com/questions/26308/industry-practices-for-schematic-design Industry Practices for Schematic Design?]</ref><ref>[https://spin.atomicobject.com/2015/01/19/hardware-version-control/ Version-Controlled Hardware Design with EAGLE] by Jordan Schaenzle, 19 Jan 2015.</ref>


GitHub, GitLab and other sites are git repository hosting service, they offer the functionality of git as well as adding their own features. Having a centralized repository allows people to collaborate on projects.<ref name="eevb" /><ref>[https://en.wikipedia.org/wiki/GitHub GitHub], Wikipedia</ref>
[[GitHub]], GitLab and other sites are git repository hosting service, they offer the functionality of git as well as adding their own features. Having a centralized repository allows people to collaborate on projects.<ref name="eevb" /><ref>[https://en.wikipedia.org/wiki/GitHub GitHub], Wikipedia</ref>

=== Setting up a repository ===
To create a repo within an existing project folder, first cd to the root project folder and then execute the git init command.<ref name="suar">[https://www.atlassian.com/git/tutorials/setting-up-a-repository Setting up a repository], Atlassian.com</ref>
<syntaxhighlight lang="linux-config">
cd /path/to/your/existing/code
git init
</syntaxhighlight>
...


=== Github ===
=== Github ===
GitHub lets you complete many Git-related actions without using the command line.<ref name="ghelp">[https://help.github.com/ GitHub Help]</ref> Images in a GitHub repository can be viewed in the browser and visually compared in different modes.<ref>[https://help.github.com/articles/rendering-and-diffing-images/ Rendering and diffing images], GitHub help</ref> To make use of this feature export schematic and PCB layouts as images.
GitHub lets you complete many Git-related actions without using the command line.<ref name="ghelp">[https://help.github.com/ GitHub Help]</ref> Images in a GitHub repository can be viewed in the browser and visually compared in different modes.<ref>[https://help.github.com/articles/rendering-and-diffing-images/ Rendering and diffing images], GitHub help</ref> To make use of this feature export schematic and PCB layouts as images.


{{stub}}
== References ==
== References ==
{{reflist}}
{{reflist}}
Line 24: Line 31:
== External links ==
== External links ==
* [https://git-scm.com/downloads Git downloads] for Mac OS X, Windows, Linux and Solaris
* [https://git-scm.com/downloads Git downloads] for Mac OS X, Windows, Linux and Solaris
* [http://git-scm.com/book/en/v2 Pro Git Book – An open source book on Git] by Scott Chacon and Ben Straub, Apress, 2014, ISBN 1-4842-0077-2
* [http://git-scm.com/book/en/v2 Pro Git Book – An open source book on Git] by Scott Chacon and Ben Straub, Apress, 2014, {{ISBN|1-4842-0077-2}}
* [https://git-scm.com/doc Git documentation]
* [https://git-scm.com/doc Git documentation]
* [https://en.wikipedia.org/wiki/Git Git], Wikipedia
=== Cheat sheets ===
=== Cheat sheets ===
* [https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf GitHub Cheat Sheet]
* [https://web.archive.org/web/20160412231021/http://training.github.com/kit/downloads/github-git-cheat-sheet.pdf GitHub Cheat Sheet]
* [http://ndpsoftware.com/git-cheatsheet.html Visual Git Cheat Sheet]
* [http://ndpsoftware.com/git-cheatsheet.html Visual Git Cheat Sheet]
=== Beginners guides ===
=== Beginners guides ===
Line 39: Line 47:
* [https://help.github.com/ GitHub Help]
* [https://help.github.com/ GitHub Help]


{{iwWikipedia|Git (software)}}
[[Category:Version control systems]]
[[Category:Version control systems]]
{{stub}}

Latest revision as of 18:00, 18 July 2020

Git is an open source popular distributed version control system (VCS) and is available for Mac OS X, Windows, Linux and Solaris. It is free and open source.[1][2][3]

Basics

Forget what you know about any other VCS.[4]

Git is fully featured when used as a command line tool.[5]

Usage for hardware projects

All VCSs can handle text & binary files but cannot merge binary ones.[6]

Git has a fairly steep learning curve, other version control systems might be more intuitive but are not as widely used. Only a few commands are needed, e.g. status, add, remove, commit, push, etc. and then usage is simple. Git works locally, a remote server is optional. When using a remote server, it can be located anywhere accessible via HTTP or SSH.[3][3][7]

A repository is a nest of folders for e.g. projects and libraries. Then git is used to commit or push changes. This way git takes care of all the tracking, removing the need for keeping multiple versions of a project and any point in the development can be returned to.[8][9]

GitHub, GitLab and other sites are git repository hosting service, they offer the functionality of git as well as adding their own features. Having a centralized repository allows people to collaborate on projects.[3][10]

Setting up a repository

To create a repo within an existing project folder, first cd to the root project folder and then execute the git init command.[11]

cd /path/to/your/existing/code
git init

...

Github

GitHub lets you complete many Git-related actions without using the command line.[12] Images in a GitHub repository can be viewed in the browser and visually compared in different modes.[13] To make use of this feature export schematic and PCB layouts as images.

References

External links

  • Git downloads for Mac OS X, Windows, Linux and Solaris
  • Pro Git Book – An open source book on Git by Scott Chacon and Ben Straub, Apress, 2014, ISBN 1-4842-0077-2
  • Git documentation
  • Git, Wikipedia

Cheat sheets

Beginners guides

Github