Question

Probably one simple question. I pushed my first project to github. I've done it with Eclipse with EGit plugin. I've clicked on a project, chose to push remote and uploaded it to git. There I have created readme file online so the structure looks like this:

Git
-- AppFolder
------srcFolder
------libsFolder
------resFolder
------etc etc
-- Readme.md

I have one other folder with screenshots of the app which I would like to have outside my app folder. Something like this:

Git
-- AppFolder
------srcFolder
------libsFolder
------resFolder
------etc etc
-- Readme.md
-- ScreenshotsFolder
------screenshot1
------screenshot2
------etc etc

How can I accomplish that? I don't want to put that folder with screenshots to AppFolder. Thank you.

Was it helpful?

Solution

Locally, just create the ScreenshotsFolder in the same directory level as AppsFolder and README.md.

Then, git add ScreenshotsFolder will add the folder and all of its content (really, all content that is not in your .gitignore file if you have one).

Next just git commit then git push remote_repo remote_branch (ex: git push origin master).

If you aren't doing this via the command line, I'm sure the EGit plugin has some option to add the ScreenshotsFolder and do a commit then push...haven't used EGit myself, though. The steps are the same either way, just a different interface.

OTHER TIPS

Are the files intended to be committed? If not, you could just .gitignore that directory.

edit: if the files are meant to be committed, why can't you just add and commit them like normal, but in new directory?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top