Basic Git Setup
Company Git Account Settings
If you have GitHub account and you are fine with using it for the work as well, add your company email address NAME@fly4future.com to your account.
If you need to create a new one, use the company email for registration.
Also set your global git config to use your work email by default.
git config --global user.email "NAME@fly4future.com"
SSH Key Configuration
You should generate an SSH Key if you don't have one yet and link it to your account.
ssh-keygen -t ed25519 -C "name@fly4future.com"
When it says "Enter file in which to save the key" just press Enter. When it asks for a passphrase, you can press Enter twice to leave it empty or add a password for extra security. Once that's done, copy your public key. It starts with ssh and ends with your email.
cat ~/.ssh/id_ed25519.pub
Go to you GitHub SSH Setting, click New SSH Key and paste it there. Run this to verify that GitHub recognizes you.
ssh -T git@github.com
-> Hi [Your Username]! You've successfully authenticated, but GitHub does not provide shell access.
[!WARNING]
Do not place your ssh key anywhere publicly available.
Global Gitignore
Next you can setup your global gitignore in your home directory for most common items.
touch .gitignore_global
git config --global core.excludefile ~/.gitignore_global
Open the file and paste there the following items. Feel free to add/remove any.
*.swp
*.swo
__pycache__
*/.tmuxinator.yml
.cache
.vscode
compile_commands.json
Git Folder
We suggest to create a git folder for all your cloned repositories/packages from where you can link them to your existing workspaces.
$HOME/
└── git/
│── your_git_repo_1
│── your_git_repo_2
└── ...
You can then symlink your package into your workspace source folder.
cd your_ws/src
ln -sf ~/git/your_git_repo_1 .