2

I cloned my repository from github and then updated the composer by adding

composer install

So I believe the composer.json page has been updated with new lines of code. I want to push it back to github online repository .

How Can I do this , I tried doing

git commit 

It give me following message

On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
        modified:   .env.example
        modified:   composer.json
        modified:   config/app.php

So changes to these files like composer.json , .env , config/app.php will not be effected on the online repository ??

Any insight on this please

Thanks

Vikram Anand Bhushan
  • 4,836
  • 15
  • 68
  • 130
  • `git add .` first before commit – uno Nov 19 '15 at 06:35
  • Possible duplicate of [Why does git commit not save my changes?](http://stackoverflow.com/questions/7704480/why-does-git-commit-not-save-my-changes) – Cristik Nov 19 '15 at 06:46

2 Answers2

1

You need to do:

git add .

Before:

git commit 

git add . will stage all files for commit. If you want a specific file to be staged than you can do git add file_name

Ref: https://git-scm.com/docs/git-add

Muhammad Bilal
  • 2,106
  • 1
  • 15
  • 24
0

Try to follow this .

From your git repository.

  1. git add .

  2. git commit -m "Comment Here"

  3. git push origin master

uno
  • 867
  • 2
  • 14
  • 29