1

this is one of my first postings on stackoverflow. I hope I explain my problem clearly for you.

I have a local git repo and I work with a git repo on drupal.org (I have the maintainer-permissions). I've followed up the git instructions on my project-page (cloning, switching to branch..). But when I add new files to a subfolder of this project and then want to push (on defining the correct origin - like in the git-instructions on drupal.org),

git push -u origin 6.x-1.x

so I get the message

Branch 6.x-1.x set up to track remote branch 6.x-1.x from origin. Everything up-to-date

Why I cannot push my new files? What I'm doing wrong?

technergy
  • 259
  • 1
  • 12

1 Answers1

3

Why I cannot push my new files? What I'm doing wrong?

Make sure to ADD your new files first:

git add FILENAME/PATH

or to add all files;

git add .

Or add newly added files AND commit using '-am' switch:

git commit -am "your message goes here"

After that, you can run your push command:

git push -u origin 6.x-1.x
Sarfraz
  • 377,238
  • 77
  • 533
  • 578
  • Also, use git status for checking what actually will be committed and what won't. – 32i Sep 07 '11 at 09:33
  • I am also new to git, and the stagging area what not obvious. [You could check this](http://stackoverflow.com/questions/676450/eclipse-git-what-does-staged-mean). – Plouff Sep 07 '11 at 10:10
  • I've noticed by trying to add a single file, that there was a submodule. I had to remove it. The tutorial at http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ was helpful for that. – technergy Sep 09 '11 at 07:13