filmov
tv
How to upload/Push file using code in GITHub

Показать описание
push file in git, upload file in git
git status
git add . : To add files
git commit -m "MESSAGE" : To commit it to ur web
git push origin main : To add it in ur web
ls : List of files in the repository
ls -a : List of files in the repository including hidden files
rm -rf .git/ : clear and remove all .git files
pwd present working directory
cd current directory
cd .. will move to previous directory (Folder)
cd \E\ To Change drive
cd XYZ will enter in the folder name called XYZ
git clone link in-order to create the repository in ur pc
if:
git status "on branch" is their we cant push it should be "branch is ahead"
…or create a new repository on the command line
echo "# spark_aws" README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git push -u origin main
…or push an existing repository from the command line
git branch -M main
git push -u origin main
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
git status
git add . : To add files
git commit -m "MESSAGE" : To commit it to ur web
git push origin main : To add it in ur web
ls : List of files in the repository
ls -a : List of files in the repository including hidden files
rm -rf .git/ : clear and remove all .git files
pwd present working directory
cd current directory
cd .. will move to previous directory (Folder)
cd \E\ To Change drive
cd XYZ will enter in the folder name called XYZ
git clone link in-order to create the repository in ur pc
if:
git status "on branch" is their we cant push it should be "branch is ahead"
…or create a new repository on the command line
echo "# spark_aws" README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git push -u origin main
…or push an existing repository from the command line
git branch -M main
git push -u origin main
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.