Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git commit directory

Tags:

git

github

I created a repo and, locally, dragged-and-dropped an existing project directory into the repo. I then did something like git add directory/ and committed it and pushed it. When I look at my repo on github though, all i see is the directory with no subfolders, no content. How do I push all of the files and subfolders of that project to the repo?

like image 815
LuxuryMode Avatar asked Dec 13 '10 01:12

LuxuryMode


1 Answers

Try this:

$ git add directory/*

(or *.h, *.c, and so on).

and then check as Aaronontheweb suggests (with gitk or git status) that the files are included in the staging area. Not only the folder name.

like image 122
Gauthier Avatar answered Oct 22 '22 00:10

Gauthier