The local repository is out of date - xcode

I'm trying to commit my project to GitHub but this is happening. Can someone please explain to me how to go about it? Iv got the local and remote - why are they not merging/syncing?

After you work for your project someone pushed the remote so you are
not updated.
You should to pull from the remote, merge your code to
local and, Finally you can push without error.
I suggest using the SourceTree or Github Desktop if you are not so much familiar with the git commands, they are much user friendly.

Related

GitHub won't let me push to remote folder (in Xcode)

I'm trying to set up a GitHub Repo for an existing Project (in Xcode). I'm already logged in with my GitHub Account. But as soon as I try to Push a commit to the Remote Repo, this Window Pops Up
I can't select anything. How can I fix that?
You can't push a local repo that is not associated with a remote repo (known, for short, as a "remote"). Give this repo a remote. You can either make one at GitHub now, or associate this repo with a repo at GitHub that you have created already. Here's how to do that using Xcode's interface:
Personally, though, I never use Xcode's Git interface for much of anything; it's atrocious. Learn to use the command line; you'll be much happier (in my opinion).

Github not updating by commit and push to the repo from xcode sourcecontrol

I cloned the project from repository and working on the project. When i tried to create new files and done some work tried to push the code to repository in the Github. When i commit and push the code using source control to the origin master it was done successfully and didn't show any error. And when one of my team member tried to pull the code from the repository the files i created my team member didn't get them. And when i check the repo the some are committed and some are not committed to the repository and also team person got some files into the local repository but not into the xcode.
Can anyone please tell what i did wrong and what should i do to resolve this issues.
Can anyone please help me solve this issue.
And thanks in advance.

How to use GitHub in VS 2015 so a moron can understand?

Downvote if you want... but I need a set of simple basic steps that we can follow. We have VS Enterprise, no GitHub add-ons installed. We have a an empty repo created on GitHub. What do each of the developers do after that? There's a local repo, right? Should there be another project on the local machine that commits to the local repo or do we open the project in the repo? If yes, how do we create that other project? What about the .sln file that VS lovingly puts in a separate folder? We have been at this for hours and believe me we have tried every combination of commit/push/sync/goat sacrifice except the right ones. We cannot reproduce consistent results such that two developers can work against the same remote repo. Sometimes one developer can push and he doesn't see the files pushed by the other developer. Sometimes the Commit Message text box lights up but the Commit button is disabled. I thought I was reasonably intelligent until I started working with GitHub.
I'll give you the broad steps you need to do. You may need to fill in a bit of the detail. THis is how I would work it. I am sure you could get many other opinions.
Create the repo on GitHub (which You already have done.)
Each developer should then go to the GitHub repo and fork the repo under their own GitHub account.
Each developer then needs to clone their repo to their local machine. (That's the beauty of Git. Every developer has the entire repo locally.) You can do this in VS2015 by choosing: File -> New -> Repository -> Clone.
Go to your on-line repo and get the URL of the repo that you will be cloning. Enter it into the New Repo dialog box in VS.
When working on the project, each developer should create a temporary feature branch, which they push to their own GitHub repo. They can then push their work as often as they want without it conflicting with other developers.
When a developer thinks that their work should be merged into master, they should go to GitHub and issue a "Pull Request" for their feature branch.
Their PR can then be discussed among the team before it is accepted.
Once it is accepted and merged into master, the developer can delete their feature branch locally and on GitHub, if he likes.
Since "master" on the team repo has now been updated, each developer will need to pull down master from the team repo to update their own local and remote repos.
It sounds more like an how-to-use git issue. You probably first need to see how two collaborators work on same project with git. I donot think either VS or GitHub has anything to do here, as both only provides you git gui tool regarding this issue.

EGit: Cloning bare remote repository, no master?

I'm in the process of convincing my team to move to using git for version control (from svn). The major hurdle seems to be convincing them that it's not going to be too complicated for others. To alleviate that, I'm attempting to create clear documentation. I need some help though with Eclipse/EGit, since I'm not as familiar with them. Coming from a Linux background, I always use git from the command line, but this is a Windows shop and asking IT to install git on everyone's machine will be seen as another layer of complexity.
So far the process for starting a new project is logging into the (linux) development server and creating a bare repository in the appropriate directory. The bare repository is (obviously) empty at this point -- so no master branch yet. This is where the question diverges from the others I've seen on SO, and most of the documentation I can find.
My question is what is the best way to clone that bare, empty repository into Eclipse and set it so that it knows to push to origin/master? I can clone it in the Git Repositories view though it seems unhappy that there's no branch. Then I can switch to the appropriate perspective I'm using for development, create the project, then import the git repo, add files, and finally commit and push and it will finally create the master branch. However this seems convoluted. Is there a more straightforward way to do this?
Thanks for the help!

What is the quickest and simplest way of setting up a shared, remote git repo on Windows?

I have just joined a team of two, and am in danger of having to being asked to use SourceSafe if I can't establish a git repo very quickly. I would like to avoid any web server etc. setup and just use a shared folder, but suggestions along this line haven't been very clear and have not worked.
First, I tried 'git init --bare' in the shared folder, and this seemed to work, but I cannot clone this repo to a local repo as I get told no repo exists there.
I would appreciate if somebody could give me clear instruction how to achieve this, please.
It shouldn't cause any problem to share a repo this way, that's the exact setup we have here.
Be sure to specify slashes when giving repo location, and that the share has been accessed in the Explorer in case it requires authentication.
git clone //server/share/path/to/repo.git

Resources