Generate key with ssh-keygen -t rsa
Press enter to select defaults.
Print the public key:
cat ~/.ssh/<key_name>.pub
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git clone <repo_link>
git branch
Your current branch.git branch <user-id>/<feature-name>
Create branch<user-id>/<feature-name>
.git checkout pretty
Move topretty
branch.git checkout -b awesome
Create a newawesome
branch and move there.
-
Please use
<user-id>/<feature-name>
for branch names. Example:lolteanu/fix-all-bugs
. Thanks! -
Make sure you are NEVER on
main
when writing code.
-
git status
View uncommitted and committed changes in files (red and green, respectively). -
git add .
Add all changes. -
git commit -m "Create an awesome change"
Commits changes with message. -
git log
Show commit history.
git push origin pretty
Push changes frompretty
branch.git pull origin main
Make sure you are on themain
branch when pulling!