Git: Setup and First Steps: Unterschied zwischen den Versionen

Aus Kicker (internals)
Zur Navigation springenZur Suche springen
Inhalt gelöscht Inhalt hinzugefügt
K Adm stehr verschob die Seite Git: Setup und erste Schritte nach Git: Setup and First Steps: Go to English as default language.
Stehr (Diskussion | Beiträge)
Revision and extension
Zeile 1: Zeile 1:
= Install git =
= Install a Development Environment =
Install an integrated development environment of your choice.
* Currently, Microsoft Visual Studio Code seems to be a popular integrated development environment.
** Download installer from https://code.visualstudio.com/
** Disable telemetry after installation, cf. https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting
*** File -> Preference -> Settings. Set Telemetry Level to ''off''.
* [https://www.jetbrains.com/pycharm/ Pycharm] could be an alternative.


= Install Default Editor for git =
⚫
https://git-scm.com/install/
Whenever a text comment is required by a git command and none is given via command line then a default editor is started.
It should be comfortable, yet lightweight.
* Linux: [https://kate-editor.org/ kate] is an option.
* Windows: Notepad++ is decent.
** Get installer from https://notepad-plus-plus.org/downloads/ .
** Accept defaults during installation.


= Install git =
Change the following options when using the graphical installer:
* Get installer for your OS from https://git-scm.com/install/ .
* Accept defaults during installation with these exceptions:
** ''Choosing the default editor used by Git:'' Select default editor from above.
⚫
** ''Adjusting the name of the initial branch in new repositories:'' Override the default branch name for new repositories: '''main'''.


⚫
== Install GUI (Optional) ==
- Choosing default Editor:
On Windows, the Explorer plug-in TortoiseGit can be helpful, although everything can be done on command line in GitBash. The TortoiseGit operations are available in the context menu.
Choose Notepad++ (or other editor of choice that is installed)
* Install MSVC++ Redistributable, which is a prerequisite to TortoiseGit:
** Get it from https://visualstudio.microsoft.com/downloads/ -> Other Tools, Frameworks, and Redistributables -> Microsoft Visual C++ v?? Redistributable. For v?? use the latest version.
* Install TortoiseGit
** Get installer from https://tortoisegit.org/download/ .
** Select the OpenSSH option during installation.


== Add git LFS (Large File System) ==
⚫
- Adjusting the name of the initial branch in new repositories:
Override the default: main


For the rest take the default options

⚫
== GUI (Optional) ==


Optionally, for a GUI, additionally install TortoiseGIT. Use the OpenSSH option during the install process
Optionally, for a GUI, additionally install TortoiseGIT. Use the OpenSSH option during the install process
Zeile 20: Zeile 37:


== Git LFS (Large File System) ==
== Git LFS (Large File System) ==
For a more efficient handling of large binary files, git LFS is used. It needs to be installed once per machine (already done on the lab PCs).

* Open GitBash and enter <code>git lfs install</code>.
In a terminal run:

git lfs install

This is necessary once on each machine.


= Authentication =
= Authentication =


== SSH (Recommended) ==
== Set up SSH ==
For a secure communication between work PC and gitlab either SSH or HTTPs can be used. SSH is recommended.
* Generate new SSH key if none available yet:
** Follow guidelines on https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
* Upload public SSH key to gitlab
** Steps described on https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account


Tutorial: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Tutorial: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent


= Initial Clone of the ProCK Repository =
== HTTPS ==
Pull the prock repository owned by hm-stehr to your local machine:
Use username (<hm-username>) and password.
* Recommended: Via SSH

⚫
** In GitBash: <code>git clone git@gitlab.lrz.de:hm-stehr/prock.git</code>
= Git Cheat Sheet =
* Also possible: Via HTTPS

⚫
** In GitBash: <code>git clone https://gitlab.lrz.de/hm-stehr/prock.git</code>
⚫
https://education.github.com/git-cheat-sheet-education.pdf
⚫
You can inspect the repository on its website: https://gitlab.lrz.de/hm-stehr/prock

= Tutorials =

⚫
Interactive Tutorial: https://learngitbranching.js.org/#

= ProCK Gitlab Repo =

== Website ==

⚫
https://gitlab.lrz.de/hm-stehr/prock

==Clone via SSH ==

⚫
git clone git@gitlab.lrz.de:hm-stehr/prock.git

== Clone via HTTPS ==

⚫
git clone https://gitlab.lrz.de/hm-stehr/prock.git


= Zum Schmunzeln =
= Git Resources =
* Git help from LRZ gitlab: https://gitlab.lrz.de/help/
⚫
* Git cheat sheet: https://education.github.com/git-cheat-sheet-education.pdf
⚫
* Interactive tutorial: https://learngitbranching.js.org/
⚫
* Pro Git book: https://git-scm.com/book/en/v2
* If things go wrong, they can often be fixed: https://dangitgit.com/


= :) =
https://github.com/danielauener/git-auf-deutsch
https://github.com/danielauener/git-auf-deutsch

Version vom 13. Oktober 2026, 08:58 Uhr

Install a Development Environment

Install an integrated development environment of your choice.

Install Default Editor for git

Whenever a text comment is required by a git command and none is given via command line then a default editor is started. It should be comfortable, yet lightweight.

Install git

  • Get installer for your OS from https://git-scm.com/install/ .
  • Accept defaults during installation with these exceptions:
    • Choosing the default editor used by Git: Select default editor from above.
    • Adjusting the name of the initial branch in new repositories: Override the default branch name for new repositories: main.

Install GUI (Optional)

On Windows, the Explorer plug-in TortoiseGit can be helpful, although everything can be done on command line in GitBash. The TortoiseGit operations are available in the context menu.

Add git LFS (Large File System)

Optionally, for a GUI, additionally install TortoiseGIT. Use the OpenSSH option during the install process

TortoiseGIT is a graphical wrapper for the git CLI. TortoiseGIT is found in the Windows Explorer context menu.

Git LFS (Large File System)

For a more efficient handling of large binary files, git LFS is used. It needs to be installed once per machine (already done on the lab PCs).

  • Open GitBash and enter git lfs install.

Authentication

Set up SSH

For a secure communication between work PC and gitlab either SSH or HTTPs can be used. SSH is recommended.

Tutorial: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Initial Clone of the ProCK Repository

Pull the prock repository owned by hm-stehr to your local machine:

You can inspect the repository on its website: https://gitlab.lrz.de/hm-stehr/prock

Git Resources

:)

https://github.com/danielauener/git-auf-deutsch