Github command & tricks

Create token to manage private repo with cli

Go to this url:

https://github.com/settings/tokens?type=beta

create a new token

Select Only select repositories

Repository permission:

  1. contents => read & write
  2. Commit statues => read & write

Save token and copy it, then git clone with this command

git clone https://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@github.com/<your account or organization>/<repo>.git

Get linux aliases

git clone https://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@github.com/Ezeqielle/aliases

CheatSheet

add file to stage

git add <file>

add commit

git commit -m ['msg']

push commit

git push

pull repo

git pull