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
Related
I am working on a solution that has 14 projects (so far) in it. I added the solution to Azure Devops source control and can see that the solution and the startup project have the little locks in the solution explorer, also I can see the startup project files in the devops repo, but I can't see how to add the other projects. Obviously I messed up somewhere, since ideally the repo would contain a folder for the startup project rather than the files themselves, but I don't know how to "undo" the source control and reset my solution back to its original state.
Can someone tell me how to either fix the source control so that the master branch contains all of the projects in sub-folders (as per the visual studio folder structure) - i.e. how to move the startup project files in the devops repo to a sub-folder and how to add the other projects to their own sub-folders, or, failing that, how to undo the source control so that all of my solution files are back on my local hard disk?
Any advice will be appreciated.
You mentioned that you are using git. So when you DO NOT have local changes which are not pushed to your git server, that means everything is "synced".
Make a backup of your folder, just copy & paste everything!
You can just delete the .git folder. So you have no "link" to the git server anymore.
You can the link the "folder" again to your git server, with sth. like:
git remote add origin https://YOURNAME.visualstudio.com/YOURPROJECT.git
Other option is check your .gitignore file, maybe some of your projects are excluded.
When you are working with Visual Studio, can can also create a new empty solution and add the projects one by one. Also be sure that there is NO Filter in Project Explorer in Visual Studio.
You can also check your git changes, with git log or git status from any terminal or command line tool.
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.
This might be a simple question but I am not able to get around it. I have a Flutter project in my Windows 10 machine and checked in to my private repository in GitHub via Android Studio.
Now I want to create a same working environment on another Windows 10 or Mac. My question is, how can I checkout the project and work on it as it is missing the supported files like .metadat, project_name.iml etc?
Below image shows what I have in the github right now.
This is more of a git question than anything else. If you have files locally that you need to have exactly the same on another machine, you should check those in. If those files are in the .gitignore file in your project, that might be for a good reason, but if you really want to sync them, you should remove them from the .gitignore and, for each file, git add -f [the file], then commit and push those files.
I recently inherited a project that used to be setup with Github for version control. However, due to lack of communication from the original developer, I'm left with code base that lives on the production. Question I have is if it's possible to recover a code repo in Github given that I have the .git folder that contains all git related files?
If there's an existing .git folder, it's probably an existing git repository. You could just follow the instructions for adding an existing project to Github and get it that way.
I'm a VSS (Visual source safe) & Dropbox guy but new to GitHub. I'm using Windows Github tool to manage repositories on our remote server as I concluded in my previous SO post. I was glad to have sought this single point easy to use tool without any need for a deeper knowledge of git.
Things have been working fine until one day I had to add a new folder
to my repository. The Windows Github tool wouldn't recognize the
folder as a new content to be pushed! After some struggle I derived
that it "does" maintain sync with my "initial folders" but simply
creating a new folder in the repository directory wouldn't sync it
like Dropbox!
I searched to know how I can do it or if I had to use GitShell. My bad any I tried it, failed. Finally, I decided to purge everything and re-create the repository folder structure with this new folder like I did with my initial setup. But I don't know how or why it kept saying that the /.git/index file was being used by another process. I tried to empty this folder but it wouldn't. Finally, a logoff was able to free that file for me and I re-created everything. Pheew!
I might be doing it wrong as a newbie or even misusing Git due to my Dropbox habits. Pls correct me! What would be the best way?
My usage is more like VSS & dropbox(with version control) in a small remotely connected team. I started with this simple Windows Github tutorial. What about the following two -
TortoiseGit
msysgit
Do they provide better management? Pls suggest if Windows GitHub is the best (if so how to add folders later?)
Just in case, do note that adding a folder won't trigger anything for Git: you won't be able to push it if that folder is empty, because Git will consider it as "no content", and will ignore that new folder.
See also "How do I add an empty directory to a git repository?".
If you add a folder and some files in it, then the GitHub for Windows interface will detect that new content, and ask you to add and commit, which means you will be able to push.