Answers for "git push to new repository"

45

set up git repository

# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
# Create remote repository (likely on github), then:
git remote add origin https://github.com/username/new_repo #https
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin master
Posted by: Guest on March-05-2020
13

git push existing repo

cd existing_folder
git init
git remote add origin https://gitlab.com/abc.git
git add .
git commit -m "Initial commit"
git push -u origin master
Posted by: Guest on August-26-2020
3

git push current project to master

git init
git add .
git commit -m 'First commit'
git remote add origin <remote repository URL>
git push origin master
Posted by: Guest on December-09-2020
7

How to upload a files to a repository on github using gitbash

git init
git add .
git commit -m "message for the commit"
git remote add origin https://url-of-github-repo
git push origin master or git push -f origin master
Posted by: Guest on May-03-2020
30

how to initialize a git repository command line

# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin master
Posted by: Guest on March-25-2020
2

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
Posted by: Guest on July-16-2021

Code answers related to "git push to new repository"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language