I'm under the impression that a cf push deploys my app to bluemix. Whereas a git push only pushes the sources to the project's git repository and does not redeploy the app. Is that correct?
2 Answers
I think it depends on how you have your bluemix toolchain set up. It does appear that a git push kicks off a build and initiate a cf push or some equivalent. The application certainly gets rebuilt after a git push.
In my case I had a file named .env that did not get included in the git push. After I explicity added that file using git add, and then did another push, the application rebuilt itself and worked properly.
The the bottom line is that you have to be careful with git pushes on bluemix.

- 111
- 2
- 14
git commands prepare and send files from your local system to your git repository. If you have a DevOps toolchain or pipeline set up, then that toolchain could monitor your repository and execute a series of steps (build, test, blue-green deploy, etc) to get your app up and running on Bluemix. However, that has nothing to do with git push, other than Bluemix is monitoring the repository to which you have sent your updated code.
cf (and bx) commands interact directly with Bluemix. cf (Cloud Foundry) push takes the contents of your current folder structure and uploads it to Bluemix.
Both cf and git allow you to ignore files and folders. This keeps you from accidentally storing things like credentials for your cloud apps in a public git repository; so you might have an entry in your .gitignore file which specifies that your env.json file is not to be stored in your git repo. However, that file is required for the app to run; cf uses a different file, .cfignore, to tell it what to ignore. local test files, local, or git oriented documentation which is not used by the running application shouldn't be uploaded to the cloud app space, so, for example, you might tell cf to ignore all files in your "Documentation" folder so that all of those presentations, pdfs, images, etc in the documentation folder don't get sent up to your cloud - Bluemix - environment.

- 1,000
- 5
- 13