Flutter project from GitHub - github

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.

Related

Pushing Xamarin forms to Github

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

When I add a solution to source control in VS 2019 Azure Devops only the startup project gets added - how do I add the others?

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.

Can I work on a github project between two machines with a usb?

So, I have a desktop and a laptop. I use both very frequently. I keep my work files on a usb and that is how I get to switch so easily between the two. Now I am beginning a project in which I use android studio and github. I am new to github.
Can I use github in conjunction with this usb drive between two computers or should I commit to using one computer? Will this create problems?
The whole idea behind GitHub is to avoid file transfer manually like that. If you want to do a project on both machines. Then...
Create a GitHub Repository
Pull your project from your repo (Do this on both Systems)
Every time you do something on one machine, before you switch to the next, commit your changes and then push them.
If you are new to Git and dont know how it works, then feel free to check out GitHub Help.

Windows Github issue pushing a new folder

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.

Problems with Xcode Source Control for Preexisting Project

So I have a project I created a year or so ago and I've been manually saving the files to an external hard drive every new version. With Xcode 4.2, source control is now totally integrated into Xcode. Or so I thought. The problem I have in not creating the git repo (see below) but getting it to work with Version Control.
In my directory (cd in) I did the following to create a git repository. I see it as such in the Organizer in Xcode and in Github for Mac. It truly is a git repo.
git init
git add .
git commit -m 'First commit'
But in Xcode, when I change a file, there is no M or A badge or otherwise that appears to let me know it's been changed. What's more, the source control contextual menu items are all disabled and thus entirely useless. I don't want to have to commit or revert in the Organizer or command line every time.
How do I enable this part of version control in Xcode? Some tag I add to the .xcodeproj file? A bool somewhere? A setting somewhere? Anyone know? Thanks!
So I figured out the problem. I had to clean the project before it would show me the badges. I restarted Xcode after that as well, which may or may not have helped. In any case, after that, it worked perfectly.
I have also found a new clean linked repo to be the answer. Simply drag the whole folder containing the xcode proj file into the Git workspace and follow the prompts. After that all is linked and cool. That said I am aware that there may be more elegant solutions and answers.