DEV Community

Kelvin
Kelvin

Posted on

WEEK 1 ASSIGNMENT.

Git

Git is a version control system used for code collaboration, tracking code changes and who made them.

How to pull requests from Git.

git --version
Enter fullscreen mode Exit fullscreen mode

git --version checks whether git is installed on your computer and what version is installed.

git config --user.name"yourname"
Enter fullscreen mode Exit fullscreen mode

git config --user.name"yourname" sets the author's name linked to the commits.

git config --user.email"youremail"
Enter fullscreen mode Exit fullscreen mode

git config --user.email"youremail" sets the email address linked to your commits.

git config --list
Enter fullscreen mode Exit fullscreen mode

git config --list shows all git configuration settings currently applied to the system.

ls ~/.ssh
Enter fullscreen mode Exit fullscreen mode

ls ~/.ssh looks for SSH folder in the home folder.

ss-keygen -t ed25519 -C"youremail"
Enter fullscreen mode Exit fullscreen mode

ss-keygen -t ed25519 -C"youremail" generates private and public SSH keys.

eval "$(ssh-agent -s)"
Enter fullscreen mode Exit fullscreen mode

eval "$(ssh-agent -s)" starts the ssh agentand sets the necessary environment variables in the current terminal session.

--unset
Enter fullscreen mode Exit fullscreen mode

--unset is used to remove a setting.

ssh-add ~/.ssh/id_ed25519
Enter fullscreen mode Exit fullscreen mode

ssh-add ~/.ssh/id_ed25519 allows git to use your key automatically without asking for the passphrase every time.

Top comments (0)