Created
April 19, 2017 17:00
-
-
Save zarankumar/5391f7633fa739510616851b00f3820f to your computer and use it in GitHub Desktop.
How to convert existing non-empty directory into a Git working directory and push files to a remote repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <localdir> | |
git init | |
git add . | |
git commit -m 'message' | |
git remote add origin <url> | |
git push -u origin master | |
Fetch from remote | |
git init | |
git remote add origin PATH/TO/REPO | |
git fetch | |
git checkout -t origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment