So, I started my Flutter project with VScode but later I completed the whole project from Android Studio and have now pushed it from Android Studio into my Github repo. In my GitHub repo, the .vscode folder (refer to the snapshot added) has been generated. Is this something I should be worried about and try removing it? I'm a newbie at Flutter and so kind of too meticulous about my codes. (^-^;)
No that's normal and automatically generated by vsCode
If it bothers you can simply ignore it using .gitignore in your project folder.
Related
Screenshot of greyed out lib folder and dart files
Hi there, has anyone else encountered the issues where the lib file is greyed out in visual studio code, and all other dart files inside are greyed out as well?
It seems to cause an issue when pushing the files to GitHub with the GitHub desktop app. I have tried looking at the .gitignore file, but I have not been able to solve the issue.
Anyone managed to solve this issue?
I have tried changing the name of the file from 'lib' to 'library', and the folder was no longer greyed out. However, doing so caused the code to crash and I have changed it back to 'lib' for the time being.
It is not an error, it will be automatically grayed out when you add and commit the files in GitHub.
There are some green indicators that are indicating that either you have add those files in your local git but didn't commit yet, or you have created new files that aren't tracking by Git. When you add those files to your Git repository and commit it, all the files will be grayed out.
I'm trying to push my xamarin forms project to github .
I've tried the regular method following the github instruction & using command line but xamarin forms project usually are big in size so that it won't be pushed throw the CMD and it recommends the Git LFS instead.
however, I found that we can push the project to github
https://devlinduldulao.pro/how-to-use-git-and-github-in-xamarin-development/
using the GitHub Extension for Visual Studio and I have installed it but the second step is to add the solution to source control.
but I cannot find the latter option in my menu
so can anyone help me with this problem, all I need to do is to push my project to github if there any other option than the one I have provided in the article above please mention it.
thanks in advance.
If its trying to push a lot, then you are missing a .gitignore file. Put this in the root folder of your solution.
Here is a github list of useful gitignore files.
A good one to use for this purpose is VisualStudio.gitignore.
At minimum, have these lines in your .gitignore file:
[Bb]in/
[Oo]bj/
.vs/
bin and obj are the main folders containing results of building. These are re-creatable from source files, so should not be in repo.
.vs is where visual studio keeps all its user-specific files (such as .suo).
This question seems to be more a git problem than a Xamarin problem. Xamarin.Forms projects aren't bigger than other projects - but you have to ensure you excluded all the build output from the beginning (using a .gitignore-file for .NET projects) - otherwise you commit binaries and your nuget-feed.
Seeing this menu structure, it seems, you already are working with git (at least with a local repo without remote). So you should check your git repo settings and add github as remote: https://learn.microsoft.com/en-us/visualstudio/version-control/git-settings?view=vs-2022
In Visual Studio 2019 is it possible to take a solution with multiple projects and upload it into a single Github repo without having to move one of the project's directory?
Is there a dependency setting somewhere in my "startup" project that will include my other project (.dll) and push all of it to a repo?
Thank you
This sounds like you need a git submodules. Refer to this solution and perhaps this YouTube video.
So I know this might sound like a noob question but I'm rather inexperienced with GitHub. I want to add a gitignore file to my repository, but I am unable to do so and I don't know how. I want to make sure a file is gitignored My visual studio code is connected with my repository. So I am able to push and pull via visual code.
Greetings,
Parsa & Liyam
You may go to File > New File at the root of your git repository (same directory as where your .git hidden folder is in). Then add all the directories/file that you want to be ignored into that new file and save it as .gitignore. (You can save as a plaintext file and just name it .gitignore within VS Code.
Vscode 1.46 is adding some automated help in generating a .gitignore file when you publish to github. From v1.46 release notes:
Publish to Github: Generate .gitignore
It's now possible to generate a .gitignore file when publishing a
workspace to GitHub. When publishing a workspace to GitHub, you are
prompted to select which files to include in the repository.
You can press Ctrl+Shift+P on your Visual Studio Code and then search for gitignore. Click the add gitignore option then you are good to go.
I want to migrate from Eclipse to Android Studio. The import works fine, but the file structure is different after import.
I followed the steps in this thread, and copied the .git directory in the root of the newly imported Android-Studio project. But git does not seem to recognize my "moved" source files but lists them as deleted and also as new files.
Old structure:
MyApp
|--src
|--com.myapp
New structure:
NewApp
|--_myApp
|--src
|--main
|--java
|--com.myapp
Is there any I can tell git to find my files without manually doing it?
Thank you, Sebastien Dawans, this was indeed the missing link. After adding with git add -u, git recognized some of my files as renamed. I wonder why not all files. Android Studio seems to touch some files while importing, which causes git to have problems identifying them. So I copied the com.myapp folder containing the java files from my eclipse folders to Android Studio folder replacing the imported files. Same with the res directory. Than git add . and git add -u
That seems to fix the issue.