Git Command line instructions (Git Lab)
Git Command line instructions
Git global setup:
git config --global user.name "Than Aung Kyow"
git config --global user.email "thanaungkyow3@gmail.com"
Create a new repository:
git clone https://............directory.git
cd directory
git switch -c main
touch README.md
git add README.md
git commit -m "add README"
git push -u origin main
Push an existing folder:
cd existing_folder
git init --initial-branch=main
git remote add origin https://...........git
git add .
git commit -m "Initial commit"
git push -u origin main
Push an existing Git repository:
cd existing_repo
git remote rename origin old-origin
git remote add origin https://.............git
git push -u origin --all
Fore to push:
git push --force origin master
If you really want to remove all of the repository, leaving only the working directory then it should be as simple as this.
rm -rf .git
Comments
Post a Comment