Skip to content

Latest commit

 

History

History
executable file
·
25 lines (23 loc) · 584 Bytes

git.md

File metadata and controls

executable file
·
25 lines (23 loc) · 584 Bytes

Git default configs

git config --global init.defaultBranch main
git config --global user.name "benjamin"
git config --global user.email [email protected]

Committing folder contents from disk to repo

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/benpdavis/REPOSITORYNAMEGOESHERE.git
git push -u origin main

Git fix commit message

git commit --amend

Push fixed message if already pushed to repository

git push --force-with-lease origin main