0

Reworded question:

I use the PHPStorm IDE. During my development process I add images for testing purposes. I want to include them in my commits, so other team members can see and pull them from the repo. How do I do that? Can I configure PHPStorm to do that for me?

Original question:

phpstorm vcs (GIT) dont upload images First of all, sorry for my English. I will try to do my best. :D

I want to know how can i configure PHPStorm to upload the images in every commit (git)... Like Sourcetree does.

For example, if i have a gallery module in my app and i upload some image to test, when i make a commit for my team they cant see the image because phpstorm does not uploaded it. Atlassian Sourcetree does but i want to use the built in VCS from PHPStorm..

2
  • 1
    are you excluding image out of working directory? see your .gitignore Commented May 16, 2015 at 16:11
  • Nope... images folder is not in the .gitgnore file. for some reason, the built-ni vcs dont upload any image.. Commented May 17, 2015 at 23:28

2 Answers 2

1

Why I think there's no configuration needed.

PHPStorm and any other IDE is just a tool to manage your git repo. You can work with the same repo from IDE, any GUI-tool and command-line simultaneously. Your question seems to be about Git and not about IDE configuration.

What one can and can't add to a commit.

Second, Git can only work with files that are in the directory, where you've initiated a Git repo. Usually it's your project's root directory. If you add your images to a directory somewhere in your project - you can add them to commit. If they are somewhere else, you'll have to download them and put somewhere in the project. I could not understand that clearly from your question.

Just tell me how to add my files!

Now, when the files are somewhere in your project folder, you can add them:

  1. From PHPStorm. Pick the file, menu [VCS] >> [Git] >> [Add]
  2. From the console. Press Alt+F12 to open the console. Then

git status to see lists of files (1) changed and staged for commit (2) changed but not staged, (3) not tracked yet. Any list may be empty.

git add full/path/to/file.png to add the files to next commit

git commit -m'commit message' or your usual way to commit files from IDE menu

Please reply whether it helps or not.

Sign up to request clarification or add additional context in comments.

7 Comments

Thank you Nick, yes i know that PHPStorm is only and IDE working with an external app called git but SourceTree is the same thing... It is just a graphic user interface for git. Sourcetree scan all my project, see the new changes and upload it all, incluiding images, why phpstorm doen't?, it is imposible or i need a configurataion?
oh... almost forgot... The image folder is into the project directory. I am woking in laravel, so, the folder image is in project>public>images
maybe SourceTree automatically commits all changes that it sees? IDEs by IntelliJ only add files and commit if you explicitely make them do it.
Ok, understood about the path to images.
In phpstorm you just need to 1) manually add the files for the next commit; 2) make that commit. If you want phpstorm to automatically scan and add all changes... well, some day you may accidentally commit some trash or delete a file.
|
0

Version 9 does.. Problem solved!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.