Pushing only one file to GIT
git
Solution
You commit only files that are added to the repository. So if you need only one file then add only the one file.
git add src/Hello/AdminBundle/Controller/DesignController.php
And then commit it. Files that are untracked are not included in the repo. There you have to add it first.
Problem
Before I do mistake, I need to know what I'm about to do is correct. I did some researches but still want make sure because I'm new to GIT and scared of messing whole project. Yes there are a lot of examples but I'm confused. That's all. I have 3 files in local GIT and just want to commit one of them and push it to live GIT. So are these steps correct? WHAT I THINK I SHOULD DO !!! ``` sudo git add web/js/admin/design.js sudo git commit -m 'Bug fix' sudo git push origin sprint-6 ``` GIT STATUS: ``` Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: src/Hello/AdminBundle/Controller/DesignController.php modified: web/js/admin/design.js Untracked files: (use "git add <file>..." to include in what will be committed) src/Hello/AdminBundle/Utility/DesignPublisher.php no changes added to commit (use "git add" and/or "git commit -a") ```