Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Git clone into an existing directory
- Here am explaining how to clone a remote git repo to an existing folder (assume this folder has some untracked files).
- Go to the existing folder in terminal
- Run $git init
- Run $git remote add origin <your git repo url>
- Run $git fetch
- Run $git checkout -t origin/master (This works better for an empty directory, wont suit for a non-empty directory)
- Run $git reset origin/master if you have some files in your local existing directory.
- View the current repo status $git status
- Stage your file for commit $git add -f *.*
- Commit your files $git commit -m “message”
- Push your changes $git push origin master
Add Comment
Please, Sign In to add comment