Skip to content

Instantly share code, notes, and snippets.

@HanjoStudy
Last active May 27, 2023 14:45
Show Gist options
  • Save HanjoStudy/6d41d4754fc37f6fb3ed9c01c71df917 to your computer and use it in GitHub Desktop.
Save HanjoStudy/6d41d4754fc37f6fb3ed9c01c71df917 to your computer and use it in GitHub Desktop.
# Option 1: Clone from github -------------------------------
# Create token in Github, use pat as password
# Use dedicated Repo PAT, owner to distribute
# Option 1: Clone from github -------------------------------
# apt-get install git-flow
# Create token in Github
git init
git config --global credential.helper store
git config --global credential.helper 'cache --timeout 7200000'
$ git credential fill
protocol=https
host=github.com
username=your_username
password=your-personal-access-token
$ git credential approve
protocol=https
host=github.com
username=your_username
password=your-personal-access-token
$ git remote add origin https://github.com/username/repository.git
$ git pull origin master
$ git add .
$ git commit -m "init"
$ git push --set-upstream origin master
chmod 600 ~/.git-credentials
# Check with
$ git config --list
# Once successful
rm ~/.git-credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment