Git Commends Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.
…or create a new repository on the command line
echo "# Ionic_app_01" >> README.md
git status
git branch
git checkout - #switch to last branch
git checkout branch #switch to specified branch
git checkout -b #create and switch to new branch
git remote add origin URL
#set a new remote
git remote -v
#Verify new remote
git remote set-url origin URL
#Instead of removing and re-adding - NEW URL
git fetch && git checkout GIT_BRANCH_NAME
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/wsmr/Ionic_app_01.git
git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/wsmr/Ionic_app_01.git
git push -u origin master
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
#####################################
Show your Git username and email
git config user.name
git config user.email
git config --list
Change your Git username and email
git config --global user.name "first last"
git config --global user.email [your email address here]
#####################################
list all the files in a commit
$ git diff-tree --no-commit-id --name-only -r bd61ad98
#####################################
https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls
git clone https://github.com/username/want-some-java.git
git clone [email protected]:username/repo.git
#####################################
git remote set-url origin https://github.com/wsmr/IonicAppTests.git
git add .
git commit -m "first commit"
git push -u origin main
#####################################
Add the package-lock.json name to the .gitignore file and save
Run git rm --cached package-lock.json
git add .gitignore
git commit -m "Ignore package-lock.json"
git push