On Thu, 24 Oct 2013 02:38:01 -0700 (PDT)
There are several issues with your problem's statement.
> When I try add files to a new repository , I get the following error.
> How can I resolve this ? Thanks.
> An internal Exception occurred during push: Source ref
> refs/heads/master doesnt resolve to any object.
Pushing is sending commits over into another repository; this act has
nothing to do with adding files to be under Git's control or for
changes made to them to appear in the next commit.
The next problem is that under no circumstance Git itself reports a
message "An internal Exception occured" because its source code simply
does not contain anything like this. Judging from the looks of this
error message, my mad telepathic skillz suggest me this is an error
reported by some Git front-end program (or an IDE) running on Windows.
Since in a freshly initialized Git repository there indeed exists no
branch named "master" ("refs/heads/master" is the full name of a branch
named "master", and "ref", in Git's lingo, designates a symbolic
reference to a commit or to another reference, so tags and branches are
all refs), what you're seeing, supposedly, is a result of an attempt to
push somewhere the history of an *unborn* branch master. Most probably
you just did not record any commit in your repository belonging to the
branch "master" (or, more likely, I reckon, no commit at all).
If I'm correct, you're confusing adding files with pushing commits,
while these two operations are unrelated.
So... I'd say *please* start with a book -- you seem to lack even the
most basic Git knowledge and hence are doomed to ask either trivial or
moot questions (like this one). You might start with .
Next time, *please* be precise about your setup: what OS, what you're
*really* using to work with Git etc, don't force us to guess.
 is a good starting point to develop the necessary skill of asking
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/groups/opt_out.