Answers for "Create new repo"

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
1

create new repo cli

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:alexpchin/<reponame>.git
git push -u origin master
Posted by: Guest on February-25-2021
0

Create new repo

echo "# DesktopApp" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/cmps277-dbproject/DesktopApp.git
git push -u origin main
Posted by: Guest on May-09-2021
0

git create new repository

git clone https://github.com/myname/myapp.git
cd myapp
touch README.md
git add README.md
git commit -m "adds README"
git push -u origin master
Posted by: Guest on May-18-2021
0

Create new repo

echo "# relaxer-app" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/DragoPvP/relaxer-app.git
git push -u origin main
Posted by: Guest on June-22-2021
0

turn a folder into a git repo

$ git filter-branch --prune-empty --subdirectory-filter FOLDER-NAME  BRANCH-NAME 
  # Filter the specified branch in your directory and remove empty commits
  > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (89/89)
  > Ref 'refs/heads/BRANCH-NAME' was rewritten
Posted by: Guest on August-24-2020

Browse Popular Code Answers by Language