Let's talk!
git config --global core.excludesFile '~/.gitignore'
- ignore files that appear frequently on your machine
- .DS_Store on MacOS
- .swp files for vim users https://stackoverflow.com/questions/7335420/global-git-ignore
git config user.email "jazzyfresh@lmu.example"
git config user.name "Jazzy Le Fresh
- do this BEFORE you make your first commit https://stackoverflow.com/questions/37805621/change-email-address-in-git
https://docs.github.com/en/authentication/connecting-to-github-with-ssh
- double check for existing keys
- start your ssh-agent
- upload public key to github
- first, go to GitHub and create an empty repo
git init
git remote origin git@github.com:jazzyfresh/talk-tools.git
git remote -v
echo "hello" >> README.md
git add README.md
git commit -m "added my readme"
git push -u origin main
- you only need the
-u
flag in the git push on your very first push- after that you can
git push
on the main branch - on your feature branches you still need to
git push origin feature-branch
- after that you can
- feature and bug fixes
- any new development that needs to happen in parallel or be approved by your peers
- it's helpful for keeping track of your changes
git branch feature-branch
git checkout feature-branch
OR
git checkout -b feature-branch
git add
git commit
git push origin feature-branch