GIT & SSH Snippets
sudo apt install git
git config --global user.name FooBar
git config --global user.email foo@bar.ch
# create new ssh key pair
ssh-keygen
cat ~/.ssh/id_rsa.pub
Restore SSH Keys 1
Change the file permission
sudo chown user:user ~/.ssh/id_rsa*
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 644 ~/.ssh/id_rsa.pub(Re-)Start the ssh-agent
exec ssh-agent bash
Add your SSH private key to the ssh-agent
ssh-add ~/.ssh/id_rsa
Ignore changes from tracked files
Ignore all further changes, but you don't want git to remove current file from the repository:
git update-index --assume-unchanged <file>
... and reenable it again
git update-index --no-assume-unchanged <file>
- Source: Snippet by Colematt↩