Sourcetree | Git Kraken | Git Desktop |
---|---|---|
PyCharm | RStudio | VS Code |
---|---|---|
git config --global user.name "Your Name"
git config --global user.email "yourname@gmail.com"
git config --global core.editor "nano -w"
ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub
climate-analysis
git clone git@github.com:yourname/climate-analysis
cd climate-analysis
ls -a
git status
nano README.md
git add README.md
git status
git commit -m "Your message"
git status
git log
nano climate_analysis.py
git diff
git add climate_analysis.py
git commit -m "Your message"
nano
to edit climate_analysis.py
# TODO: Add rainfall processing code
” to the endnano climate_analysis.py
git diff
git add climate_analysis.py
git commit -m "Your message"
git log
git diff HEAD~1 climate_analysis.py
git diff HEAD~2 climate_analysis.py
climate_analysis.py
since thengit log
git diff <COMMIT ID> climate_analysis.py
rm climate_analysis.py
git status
git restore climate_analysis.py
git checkout <COMMIT ID> climate_analysis.py
git push
Local:
nano README.md
git commit -am "Your message"
Remote:
README.md
to add install info to the endmain
git pull
git config pull.rebase false
if it failsnano README.md
and remove the <<<
/===
/>>>
git commit -am "Your message"
git push
git branch
git branch dev
git switch dev
nano rainfall_conversion.py
git add rainfall_conversion.py
git commit -m "Your message"
ls
git log
git switch main
ls
git log
git switch dev
git push origin dev
git config --global push.autoSetupRemote true
git switch main
git merge dev
git switch dev
mkdir results
touch a.dat b.dat results/a.out results/b.out
git status
nano .gitignore
*.dat
and results/
git status
git add .gitignore
git commit -m "Your message"