github - git ignore on one branch but not on another -
There is a repository that is not on my gitub. I had cloned it, so now I have a copy of it in my Gitub account and it is a copy of that repo on my computer. I have created a branch which has its own directory and all the files that I am committed to that branch, it is called apple when I switch back to the master branch, then I get the information in the situation that the directory and all that The files that I was committed to in apple showed up in the situation. So now I have hundred or so files, every time I switch to master I see.
My question is how can I create it so that when I masted those files which I have not got attention to the branch of apple? I am sure that I can modify Guitnor in the master, but it will change the project.
thanks If you have actually added new files and put them on the branch apple, then back to master Switch, in which apple is not included in its history, then those new files will not appear. Something about your description of the problem does not make sense. Perhaps you do not know that in git, you should And then you will be in the master branch, and there will be no bribe
edit: Commenters have said that if the files were made in another branch, when I switch the branches and it Right, then they should not show them. After working with everyone, what I was searching for here, what I found was that, which was one of the subdirectories in the directory I created on the Apple branch. Gittagnor did not pay attention to a lot of files. Gitgnore was committed to celebrity and when I changed the branches (for example in the master branch), that directory was specialized. GuitGorner disappeared and originally being untracked in the form of GIT-GUI, all files which were ignored on the branch of apple. So I had a lot of files which I thought was committed on Apple's branch but were not really. Sorry for the misunderstanding! I'm marking Ryan Stewart's answer as correct. git commit the file before
git add (unless you specifically
git Do not use committed & lt; files & gt; )? Specifically, if you have added the banana of the directory on the branch's apple, you can do the following:
git banana git commit -m "ban feature" git checkout master
after the GIT checkout apples , bananas will come back again as it exists in that branch.
Comments
Post a Comment