What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-29 01:55:02
rename branch to main
# Step 1 # create main branch locally, taking the history from master git branch -m master main # Step 2 # push the new local main branch to the remote repo (GitHub) git push -u origin main # Step 3 # switch the current HEAD to the main branch git sy... Add solution -
Shell/Bash 2021-08-28 15:22:01
how to move master branch to main branch
# Step 1 # create main branch locally, taking the history from master git branch -m master main # Step 2 # push the new local main branch to the remote repo (GitHub) git push -u origin main # Step 3 # switch the current HEAD to the main branch git sy... Add solution -
Shell/Bash 2021-08-28 09:40:03
git init repo
# 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 git@gi... Add solution -
Shell/Bash 2021-08-27 04:13:02
create a repository git terminal
# 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 git@gi... Add solution -
Shell/Bash 2021-08-27 01:42:01
how to initialize a git repository command line
# 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 git@gi... Add solution