git
last edited Fri, 25 Oct 2024 08:43:51 GMT
backlinks: null
git
Git global setup
git config --global user.name "Elizabeth"
git config --global user.email "lzrddev@riseup.net"
Create a local config
$ git config --local user.name "Local User"
# Create a system config
$ sudo git config --system user.name "System User"
Push an existing folder
cd existing_folder
git init --initial-branch=main
git remote add origin https://gitlab.com/lzrddev/suckless-setup.git
git add .
git commit -m "Initial commit"
git push --set-upstream origin main
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitlab.com/lzrddev/suckless-setup.git
git push --set-upstream origin --all
git push --set-upstream origin --tags
View changes
$ git log
git pull
fetches and merges while fetch
and merge
are separate commands