Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to push local code to git repository

Create a new repository on the command line
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/neetigyachahar/codebox.git
git push -u origin main
Comment

How to create a local repository and push to github repository

echo "# kiels-excel-sheets" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/kielSDeM/kiels-excel-sheets.git
git push -u origin main
Comment

create a git repository from local machine and push it online

#initialize 
git init 
# add your URL , it can be local or remote one 
git remote add origin <YOUR_URL>
# commit something
git add *
git commit -m "your message"
# push to your repository 
git push origin master
# you can then go and check online
Comment

how to push local code to git repository

--::-- Using SSH --::--
#### Create SSH key ####
$ ssh-keygen -t ed25519 -C "<YourEmail>@<Domain>.com"

#### Copy the SSH key ####
$ cat /path/to/private_key_file.pub

#### Add the SSH key to your GitHub account ####

$ echo "# myPracticeRepo" >> README.md
$ git init
$ git add README.md
$ git commit -m "first commit"
$ git branch -M main
$ git config core.sshCommand 'ssh -i /path/to/private_key_file'
$ git remote add origin git@github.com:<UserName>/<RepoName>.git
$ git push -u origin main


--::-- Using HTML --::--
$ echo "# myPracticeRepo" >> README.md
$ git init
$ git add README.md
$ git commit -m "first commit"
$ git branch -M main
$ git remote add origin https://github.com/<UserName>/<RepoName>.git
$ git push -u origin main
Comment

PREVIOUS NEXT
Code Example
Shell :: install simplejwt django 
Shell :: add username password git 
Shell :: dartlang ubuntu 
Shell :: github api fetch 
Shell :: list inactive services ubuntu 
Shell :: git push remote 
Shell :: grep without match 
Shell :: inkscape svg to pdflatex 
Shell :: /gi regex 
Shell :: git branch 
Shell :: powershell get OS 
Shell :: brave installation ubuntu 
Shell :: Powershell TLS 
Shell :: restart odoo service ubuntu 
Shell :: bash check if string in file 
Shell :: install cypress dev only 
Shell :: bash read file content 
Shell :: install package in docker 
Shell :: composer for windows 
Shell :: setup systemctl redis 
Shell :: remi repo 
Shell :: magento installer 
Shell :: valgrind example usage 
Shell :: bash not equal 
Shell :: intel hd 4000 ubuntu driver 
Shell :: how to install node using nvm 
Shell :: bash get field from line 
Shell :: linux hex to dec 
Shell :: create a new branch and publish gitub 
Shell :: Push First repository 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =