1

This is what I need to do.

I have a project folder in my local drive. And my local Git repository is somewhere else on the local drive. I need to push the project folder to a remote Git repository. Without creating a new repository in my project folder or moving the project folder to local Git repository.

I have TortoiseGit. And Eclipse with the Git plugin.

I mostly use Subversion (SVN). I know the above is possible in SVN, but is it possible with Git?

1 Answer 1

2

From your project folder, you can use GIT_DIR to specify where your Git repository is:

 cd /project/folder
 GIT_DIR=/path/to/repo/.git git add .
 GIT_DIR=/path/to/repo/.git git commit -m "my commit message"

That means you are considering your project folder as a working directory for a Git repository which is located elsewhere.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.