Assume: Working in Windows platform
Assume: You have installed Git Gui
1. Open Git Bash
2. Create a repository remotely:
In the Git Bash box:
> cd "yourDropboxDir\YourProject\Git"
> git init --bare yourProject.git
(it creates directory yourProject.git)
3. In the Git Bash box, go to the project directory (e.g. c:\project)
> cd "c:\project"
4. Create a repository locally:
> git init
> git add .
> git commit -m "New Git repository"
5. Push from local to remote:
> git remote add origin "yourDropboxDir\YourProject\Git\yourProject.git"
Note: yourProject.git at the end
> git push origin master
6. Done. Remote Git Repository is ready to use! (Also, you can start your development in "c:\project" directory)
Bouns: How to start a new Git development environment from a remote repository?
7. Pull from remote repository to a new working directory:
- Create a new folder for the project (e.g. c:\working)
- Start Git Bash (by right click in the explorer)
> cd "c:\working"
> git clone "yourDropboxDir\YourProject\Git\yourProject.git"
No comments:
Post a Comment