Skip to content

alrch/learn_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Learning git

Local repo

mkdir %folder name%
cd %folder name%
git init

Connect wth GitHub repo

  1. Create GitHub repo
  2. Create ssh key on your machine
ssh keygen
  1. Add ssh key to GitHub
  2. Connect
git remote add origin git@github.com:%ИМЯ_АККАУНТА%/first-project.git

Do changes in your folder and commit

  • create file
touch test.txt
echo "first line" > test.txt
  • commit changes
git add .
git commit -m "my first commit"
  • push to GitHub
git push -u origin master
  • do changes in your file
echo 'second line' >> text.txt
  • commit them
git add .
git commit -m "second commit. adjust file"
git push

Log

git log
git log --oneline

About

for my friend to learn git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published