Skip to content

Instantly share code, notes, and snippets.

@Lysak
Last active September 24, 2022 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lysak/10befb2deeb5c2bf9af36e0f6de8deae to your computer and use it in GitHub Desktop.
Save Lysak/10befb2deeb5c2bf9af36e0f6de8deae to your computer and use it in GitHub Desktop.
Setting up a new Git Repo

Setting up a new Git Repo

…or create a new repository on the command line

echo "# <reponame>" >> README.md
git init
gitmyname
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:Lysak/<reponame>.git
git push -u origin main # -f

========================
========================
========================
========================
========================
========================

echo "# .idea" >> README.md
git init
gitmyname
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:Lysak/.idea.git
git push -u origin main -f

…or push an existing repository from the command line

git remote add origin git@github.com:Lysak/<reponame>.git
git branch -M main
git push -u origin main # -f
@Lysak
Copy link
Author

Lysak commented Jun 28, 2022

alias gitmyname='git config user.email "dlysak@live.com" ; git config user.name "Dmytrii Lysak"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment