Open henryliangt opened 12 months ago
Token Using a Personal Access Token (PAT):
git config --global user.email 'xxx@gmail.com' git config --global user.name 'hl'
git config --global credential.helper store
This command configures Git to store credentials in plaintext on the disk.
git push git clone https://github.com/henryliangt/xxx.git
GitHub username -> Instead of entering the password, use the personal access token you generated.
Ubuntu Commit
git remote set-url origin https://
pull
cd sjtu
git clone <repository_url> .
git clone https://github.com/your-username/sjtu.git .
if username wrong:
git config --global credential.helper store
update credential in local files. for convenience.
or Git Credential Manager for Windows
Git Credential Manager Core for cross-platform support.
git pull origin main
commit changes
git add . git commit -m "Your commit message here" git push origin main
changes happen,then
check changes:
git log
git log --oneline
git log -p ( "q" to stop showing more)
cd
git pull origin main
pip install -r r.txt
pip freeze > r.txt
pip install --upgrade pip
pip cache purge
pip install -r requirements.txt
conda install -c conda-forge --file requirements.txt
conda install --file requirements.txt
conda list
conda install --file r121.txt --exclude="argon2-cffi"
conda create -n myenv --file r.txt
conda list --export --no-builds | grep -v "prefix:" > requirements.txt
git config --global core.autocrlf true git config --local core.eol lf
pip install pipdeptree
pipdeptree --warn silence --warn silence --warn silence --warn silence --warn silence -f --warn silence --warn silence | grep -E '^\S' > requirements.txt
pip install -r r.txt
list all and check all the branches
git branch -a
if no branches, create onegit checkout -b main
Go to your GitHub repository (https://github.com/your-username/sjtu). Copy the repository URL.
git remote add origin <repository-url>
git push -u origin master
username&password or tokengit clone <repository-url>
username&password or token