GIT: I upload the changes but they do not appear [closed]

1

The problem I have with the git is that I want to clone the project on another computer and several classes .cs are missing. The strange thing is that these classes appear but with a yellow triangle and, when I access the folder where I have cloned the project, they are not.

I access the other computer and

  • I make a change in those classes and when I want to upload the changes, it tells me that there are no pending changes;
  • I create new classes and it tells me the same, that there are no changes;
  • I go to the other computer and it does not let me upload anything either;

But about the classes that do exist, it allows me to modify, I have been able to work well but now it does not stop me from doing so pull and push the project does not compile. I had to create a new branch from the last version and it compiles me, but the same: I can not upload changes.

Any idea why this can happen?

I use windows 7, the repository is not public, and in Visual Studio I do what I've always done, add elements or modify, I get the check in red indicating that there are changes. When I go to Team Explorer and select the option changes, it tells me that there is no ... unless the changes are made on the elements that I can download.

    
asked by Alexis Navarro Cruz 09.05.2017 в 10:38
source

2 answers

0

Check that the file is added to the project with the tag <Content Include=nombrefichero.cs>

It could also be that in the build action properties it is marked as none.

    
answered by 26.07.2017 в 17:34
0

The problem must be that within the project configuration you have referenced a .cs file that you are not including in your commit .

The project configuration files in Visual Studio are xml where all the files are declared.

For example:

<ItemGroup>
    <Compile Include="Logger.cs" />
    <Compile Include="Properties\AssemblyInfo.cs">
      <AutoGen>false</AutoGen>
      <DesignTimeSharedInput>false</DesignTimeSharedInput>
    </Compile>
    <Compile Include="My\MyApplication.cs">
      <AutoGen>false</AutoGen>
      <DesignTimeSharedInput>false</DesignTimeSharedInput>
    </Compile>
    <Compile Include="My\MyComputer.cs">
      <AutoGen>false</AutoGen>
      <DesignTimeSharedInput>false</DesignTimeSharedInput>
    </Compile>
    <Compile Include="My\MySettings.cs">
      <AutoGen>false</AutoGen>
      <DesignTimeSharedInput>false</DesignTimeSharedInput>
    </Compile>

The safest thing is do not have the file in the file system for example in /ruta/Clase.cs but if it is in the configuration, that's why you get that message.

If the files are in a folder, you can right-click on the folder and select open folder in the file browser and see what's missing, and add them in the commit of your original equipment and then push them to the remote.

    
answered by 10.08.2017 в 16:30