11/02/2021 - git commands for remote repo
git commands inital upload: git init --create github repo, copy the url create .gitignore, add in /node_modules, .env etc git commit . -m '<msg>' git remote add origin <url> git checkout -b <branch> git push origin <branch> deleting folder: (in case you added node module by accident) git checkout <branch> git rm -r <folder> git commit . -m '<msg>' git push origin <branch> adding/deleting/checking remote: git remote add origin <url> git remote -v git remote remove origin updating file: git commit . -m "<msg>" git push origin <branch> cloning from remote to local, updating changes from local to remote: --within working folder git init git clone <url> --> you get a subfolder with the cloned repo cd into the cloned folder git commit . -m "<msg>" git add remote origin <url> git fetch origin git push origin <branch> amend single file: git commit <file> -m ...
Comments