4

I have a git repo with two branches: develop and master. I work mostly at develop and when files are ready (sometimes not so sticky to this affirmation) I merge them to master branch to put them on production. Take a look to this pic:

enter image description here

All that files comes from develop branch and was merged but I only want to commit and push RepresentativeRestController.php but any time I do right click => commit all of them are included on the commit. How I get rid, temporary since they will be added later, of the ones I don't want to be included on the commit? I use Smartgit as a GUI client for Bitbucket repository. Any advice?

1
  • 1
    Judging by the commit message it seems that you want to merge the commits from the develop branch onto the master branch. The merge operation should create a new commit in the master branch, that's probably why the app does not let you to However if you say it lets you unstage some files it can not be a "merge commit" Are you trying to "merge" some uncommited files from develop to master? That's not how a merge should be performed. Commented Jun 4, 2015 at 22:21

2 Answers 2

5

Use terminal to commit selected file : like: you have 100 files (10 type)

git add *.* all file

git add *.jpg all jpg file

$ git add . # add to index only files created/modified and not those deleted

$ git add -u # add to index only files deleted/modified and not those created

you can use source tree for all git work.

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

Comments

3

When you make a commit, all the staged file are included in the commit. If you wish to exclude certain files from a commit, unstage those files first.

I'm not sure how to do that with the Git UI you are using, but there should be a screen or something to manage which files with changes are staged and which aren't.

1 Comment

Thx, all that I need to know was "unstage" I wasn't clear about it. I have tested from the GUI and it works

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.