Skip to content

Instantly share code, notes, and snippets.

@michalpenka
Last active March 18, 2020 14:06
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 michalpenka/6008c82e7ebbabc35415266a0d16629d to your computer and use it in GitHub Desktop.
Save michalpenka/6008c82e7ebbabc35415266a0d16629d to your computer and use it in GitHub Desktop.
Clone repository, move existing code to git-managed directory, add .gitignore and finally stage, commit and push the code to remote
cd source/repos
git clone https://YOUR_USER@dev.azure.com/YOUR_ORGANIZATION/HelloWorld/_git/HelloWorld helloworld_git
mv -v helloworld/* helloworld_git/
rm -r helloworld
cd helloworld_git
dotnet new gitignore
git add -A
git commit -m "Initial version"
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment