Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git init set upstream

#create a new repository:
git init
echo "# MESSAGE" >> README.md
git add README.md
git commit -m "first commit"

#set upstream url
git remote add origin git@github.com:User/UserRepo.git #first time
git remote set-url origin git@github.com:User/UserRepo.git # change existing to new

#At the end I perform push:
git push -u origin master
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #init #set #upstream
ADD COMMENT
Topic
Name
9+2 =