On Sat, 28 May 2016 17:19:34 -0700 (PDT)
"'dev_aka' via Git for human beings" <firstname.lastname@example.org> wrote:
> I am having trouble pushing my referenced library to git, I am
> working on eclipse and i am using a jar file which is inside lib
> package (Project/src/lib). When i push the project the referenced
> library inside that folder is not pushed. How can I fix this?
The question is quite vague, unfortunately.
So what I'm about to do is plain guessing.
If you're pushing your project directly from Eclipse (I mean, by
clicking some button or activating an entry of some pop-up menu) then
you are not using Git but rather EGit -- an Eclipse's library to work
with Git repositories which itself uses JGit -- a from-scratch
implementation mimicking Git. All this stuff does not use "stock" Git
at all and does not even require it to be installed in the system.
To being with, this is a useful thing to understand.
Now, with "plain" Git (and not whatever Eclipse uses) everything you do
to your project in whatever IDE or text editor or whatever other piece
of software merely changes your project's files, and Git itself won't
know about these changes until you explicitly tell it by using commands
such as `git add` and `git commit`.
To explain it better: your Eclipse project typically has a dedicated
file -- or a set of files -- recording which external libraries it
references. These days such a project file is typically an XML file,
and when you start referencing a library that project file gets some
XML element added somewhere. So with plain regular Git you would need
to `git add` both your updated project file and the referenced
library's file and then run `git commit` to actually commit these
changes, and only after all those actions the next `git push` would
actually do what you would want it to do.
As you can see, your question is rather Eclipse-specific: does
referencing a library in Eclipse automatically starts tracking its file
with Git? I have no idea. Are updates to your project file are
noticed and committed? I have no idea either.
So the answer I can possibly provide you with is two-fold:
1) If you're using plain Git outside of Eclipse, then make sure you
`git add`-ed both your library file and the project's metadata,
2) If you're using Eclipse's own means to working with Git repositories,
please reach for Eclipse support channels as your question has
nothing to do with Git.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.