I have a sub-application project that I had previously converted to edge
rails under svn. Originally, vendor/rails was set up with svn:externals
so that an svn update at the project's root would pull the latest trunk
along with all the other updates. Since Rails has moved to GiT and
depreciated svn I decided to remove the svn:externals reference for
vendor/rails and reinstall trunk using 'git clone
git://github.com/rails/rails.git'.
The question that I have is: what git command does on use to check
for/retrieve updates to trunk? Does one simply reissue the git clone
command? Is there a simple way (from the command line) to check for
updates without pulling them?
The question that I have is: what git command does on use to check
for/retrieve updates to trunk? Does one simply reissue the git clone
command? Is there a simple way (from the command line) to check for
updates without pulling them?
After you've cloned the repos, you can use "git pull" to get the
latest updates.
The question that I have is: what git command does on use to check
for/retrieve updates to trunk? �Does one simply reissue the git clone
command? �Is there a simple way (from the command line) to check for
updates without pulling them?
After you've cloned the repos, you can use "git pull" to get the
latest updates.
Is there a way to run git pull from the project root directory? The
example given above works provided that I cd to the vendor/rails
directory first. However, if I try this from the project root:
git --work-tree=vendor/rails pull
or this
git --git-dir=vendor/rails pull
then I get this error:
fatal: Not a git repository
Failed to find a valid git directory.
On a whim I even tried this:
git pull vendor/rails/.git
but that worked no better than the first two attempts.
I regret if these questions appear naive but I cannot find an answer to
them in the documentation, or if answers are there then I do not
apprehend them.
It appears as if I must issue "git submodule update vendor/rails" for
this to work the way I desire. Is there something that I should be
doing differently?
As shown, these commands do not provide the desired result. the rails
directoty is not pulled from the repository. I suppose that I can
remove vendor as well and try again but this seems a bit draconian. Am I
missing a step?
Now when I do a git submodule update I keep recreating a rails directory
immediately beneath the project root. I cannot seem to find any
discussion of removing a submodule from git so, if anyone here knows how
it is done, I would be most appreciative learning how.
I need just a little more help in cleaning this up:
James Byrne wrote:
Having added a submodule in Git, how does one remove it?
Did not look hard enough, although the answer is a bit obscure:
Edit the file .gitmodules in the git project root directory to remove
the unwanted reference.
Removing the unwanted reference from .gitmodules and from .git/config is
not enough. There is a reference to the defunct submodule kept in
.git/index. How does one remove that?
I have a project in a remote GiT repository that was imported from a
Subversion repository. I git-clone this to my local machine and none of
the svn externals are preserved. No surprise there. However, I want to
add edge rails as a submodule to my local GiT clone and push this back
to the master.
Doing this at the root of the cloned repository does not seem to work:
# git submodule add git://github.com/rails/rails.git vendor/rails
# git submodule init
# git submodule update
# # This does nto seem to accomplish anything:
# git-push git-push --all --dry-run
Everything up-to-date