简体   繁体   中英

Unable to push .dll and .exe files into GitHub repository

I have a piece of OpenGL code in a GitHub repository. I start by cloning the whole repository into my computer and then create Visual Studio solution via CMake. Inside the CMake file I am defining the project output path as follows:

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

which is the same folder that I have for the repo. This folder needs to hold a bunch of *.dll files such as glew32.dll in order to run the executable file. However, whatever files are added to or changed in this folder does not appear in my GitHub desktop software. I am able to commit all changes in my source files and push to or sync with GitHub web tool but the "bin" folder and the *.dll files never upload to the web. As a result, whenever I want to clone the repo into another directory/computer, I need to take care of the *.dll files myself. I will really appreciate if someone can tell me how to push the executables and library files to the ropo.

I initially thought that this problem is caused by .gitignore file. For the .gitignore, I have created it from gitignore.io by choosing the following keywords: Windows, Visual Studio and C++. However, I have deleted the *.dll, *.exe, *.ilk and *.pdb file formats.

The answer to this questions lies in the gitignore file. Upon setting up GitHub repo with Visual Studio's GitHub extension it is easy to deal with this issue. However, @ Tim Biegeleisen was right. The best practice to version control of your code is to only track the changes of source files and perhaps store them in a separate location from the binary and executables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM