Git (and Python) workflow when contributing to the official KiCad libraries: Difference between revisions

no edit summary
(Created page with "This description of the '''Git (and Python) workflow when contributing to the official KiCad libraries''' is intended as a simple walk-through how-to for users new to KiCad...")
 
No edit summary
Line 54:
 
The command line is the only place you can run ''all'' Git commands, most of the GUIs implement only a partial subset of Git functionality for simplicity. If you know how to run the command-line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true.<ref>[https://git-scm.com/book/en/v2/Getting-Started-The-Command-Line Getting Started - The Command Line], Pro Git by Scott Chacon and Ben Straub</ref>
 
=== Initial setup ===
To set global Git configuration options such as username and email using the git config command. If you pass the --global option this only needs to be done once.:<ref name="atl">[https://www.atlassian.com/git/tutorials/setting-up-a-repository Setting up a repository], atlassian.com</ref><ref>[https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup Getting Started - First-Time Git Setup], git-scm.com</ref>
 
To setup the user name
<syntaxhighlight lang="linux-config">
git config --global user.name "John Smith"
</syntaxhighlight>
To setup the user email address
<syntaxhighlight lang="linux-config">
git config --global user.email john@example.com
</syntaxhighlight>
 
To check the user name
<syntaxhighlight lang="linux-config">
git config user.name
</syntaxhighlight>
To check the user email address
<syntaxhighlight lang="linux-config">
git config user.email
</syntaxhighlight>
 
=== Usage (e.g. for footprints) ===
Line 78 ⟶ 99:
</syntaxhighlight>
 
Add the official KiCad repo as another remote. This takes care of keeping all branches up-to-date between your fork ("origin") and the KiCad repo ("upstream"). This only needs to be done once:<ref name="atl"/>
<syntaxhighlight lang="linux-config">
git remote add upstream https://github.com/KiCad/kicad-footprints.git