![]() ![]() When you now run git in your parent folder, git sees that the subdirectory is a repository in its own and essentially goes "ah, that folder is already controlled by something else" and doesn't touch it. Because now you have a git repo (VS's) in a folder that is in a different git repo (the one you manually created). But, if you want your new project to be a subfolder of a repository, this can cause the exactly the "problem" you've seen. ![]() This generally makes sense if you want to source-control your project, that's why that thing is there. When "Use git for version control" is ticked, Visual Studio makes a git repository out of your new project. Let me explain why it is like this, if you wonder in the future. If anyone has struggled and has an answer, that would be great. So then I removed the files and Github will still not read the files within the " Demo" folder or any other folder for me to commit and push and I cannot figure out why. So I tested a theory to see if Github could read files in general, so I copied some files and added to that repo folder, and Github desktop read and recognized the files. I made sure I was in the right repo multiple times. When I open up Github Desktop to commit and push the files back up to the repository, the application will not read the contents of the " Demo" folder itself. Then we have to go into Visual Studio 2022 (not VS Code) and create our C# program, and save it within the repository we cloned. When it comes to git, however, knowing the CLI is a fundamental skill.So, for class, I have to clone down the repository from our teacher using Github Desktop, which is all well and easy. I think a lot of work would be accelerated if companies adopted IDEs and modern development environments into their workflows. I would literally run one command, check gitk, run another, check gitk.sounds annoying, but I learned much faster that way.Īnd just to throw in a disclaimer: I'm not 100% married to the terminal. Gitk (which comes packaged with git) was instrumental to showing me visually how my repo would change after running a command. I would recommend using a GUI only for visual output. ![]() Staying within the terminal - where much of your development will likely be done depending on where you work - will allow you to quickly close out of files, do what you need to do in git, and be back to developing in seconds. Not everyone will have Github Desktop, but anyone (well, most employers) will have access to the underlying git tool. GUIs have a way of boxing you in when mentors say, "click on these buttons in this order to do the thing." Learning the atomic git commands will make you much more flexible and allow you to develop your own workflow as you gain experience. ![]() You will become a better, more agile developer by learning raw git commands for several reasons: I can confidently say that my skills with git are among the most invaluable to me as a developer, and my coworkers greatly value the knowledge I have to share. The problem is that by delivering a curated experience, that GUI is preventing you from learning. GUIs will show me things visually and make sure I can't hang myself." "Why learn the CLI? It's more complicated and requires more memorization. Honestly, I had the same thought about a lot of tools when I was first starting out. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |