Add Github remote to GitKraken - windows

I'm using GitKraken (v. 1.4.1) as my Git managing tool. And now I want to use Github as a remote to back up my repos. But when I click on add remote and try to add a Github repo, it just says 'no match'
Does anybody know why this happens? (BTW: I'm using Windows 10, just in case that's relevant)

Here's how it seems to work. If you have a local repo and want to connect it to github, you would use the "URL" option and put in the github address to set that as the remote repo for your local repo. The first time you do a pull or push on a local branch, it will ask which remote branch you want to use and that becomes the remote location to which you will pushing and pulling changes.
The GitHub.com option only comes into play after you have set the remote repo using the "URL" option. If there are multiple collaborators on a project and someone has created one or more forks of the project, then instead of "No Match" under the GitHub.com, you would see a list of all the forks of the project on which you are a collaborator.
You could then add the forked repos as the 2nd, 3rd, etc. remotes, and any activity on those forks would be displayed to you on the commit graph. This allows people to see what's going on in the forks, and you can drag and drop from the forked parts of the graph to create pull requests to the repo you first set up using "URL".
It's a nice feature, but the remote dialog could be labelled more clearly so that people would know the GitHub.com option was for adding forked repos to the commit graph display.
You must always use the "URL" option to add the 1st remote, and then the GitHub.com option only becomes available after that if there are forks to which you have access.

If GitHub is set with your account in GitKraken, you might need to create first an empty repo with the same name as your local repo.
That way, GitKraken can find a matching repo name in your GitHub account.
Or you could select "URL", and enter the right GitHub repo url directly there. Which is what Jim Meyer's answer confirms above.
Note that GitKraken 6.5 (January 2020) will create, then add a GitHub fork repo automatically!
Forking GitHub Repositories in GitKraken
Formerly, users were required to leave GitKraken, go to their hosting service, fork the desired repository, come back to GitKraken, find the related remote, and then find the forked repo. 😅
Now, GitHub users can fork repositories directly through the GitKraken GUI, no more time wasted context switching.
v6.5 allows users the ability to fork GitHub repositories in GitKraken through the GitHub integration.
Simply navigate to the remotes pane in the left panel and click the + button to add a remote.
If you don’t already have a fork on the selected GitHub repository, GitKraken will automatically present you with the fork option.
You will see the message “You have not yet forked microsoft/vscode on GitHub.”
Click the Fork and Add Remote button, and it will fork the repo and add it as a remote to the left panel.

Gitkraken (V3.3.4 64bits on windows) behaviour is strange at this feature level. Same name or URL input doesn't work for me.
So the best and quick way to attach the remote repo to your local is to use the simple Git command line in local repo directory (git#... is your remote URL Github, GitLab...):
> git remote add origin git#...
Gitkraken recognise dynamically it after less than 5 second . Then you can push your existing local files.

Not to add to an old posting but I had the same issue and found this article first so wanted to help anyone else having this issue.
You can get to it by doing the following.
Click the folder icon in the top left corner
Click Clone
Go to the GitHub tab and you will see all your GitHub repos. Clone the one you want and then open it and you are set.

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).

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.

Publish local Git repository to Team Foundation Service

About a week ago Git support was added to Visual Studio 2012 and Team Foundation Service. I've been playing around with it a bit and wanted to publish a local repository to my team project. It's described in step 2 on the Team Foundation Service website:
Publish your local Git repository into your new team project.
Now I've been doing the exact same thing, but I don't get the "Publish to ..." context item. Could this be a bug or am I missing something?
I was having the same problem. I don't know why.
However, after a bit of playing around, I managed to get the following
working. Disclaimer: can't guarantee this is actually the correct way
to do it. It may bork things further. And whether it does the same as what the missing 'Publish' menu item is supposed to do, I have no idea. Use at your discretion...
Get the url of your git repo in the project you set up in TFS.
Go to your project in the TFS web interface, then Code tab.
You should get a message that gives you the URL.
e.g. https://user.visualstudio.com/DefaultCollection/_git/YourProject
Edit the .git/config file on your local repo.
Configure the origin remote to point to your TFS repo.
(note: if you already had an origin remote, you might want to rename that first to keep it)
e.g.
[remote "origin"]
url = https://user.visualstudio.com/DefaultCollection/_git/YourRepo
fetch = +refs/heads/*:refs/remotes/origin/*
Open your solution in Visual Studio.
Edit a file.
Do a commit.
Do a push.
This should hopefully push your local repo to your TFS remote as origin.
From here things seem to be working for me -- the code is up in my TFS
web interface at least, and I can push commits to it. I can add backlog items etc. I'm new to TFS though so not sure if it's actually all working as it should be.
I was just having the same problem, and the answer by ngm didn't work; I had to do the opposite. The [remote "origin"] section was already in my .git/config file, however the project code wasn't uploaded to TFS.
To fix it I just deleted that section from the config file, then restarted Visual Studio and followed the official instructions.
I had this same exact problem. I was able to resolve it by restarting Visual Studio completely, opening Team Explorer, then navigating to my local repo. I opened up my local .sln, then clicked on "Changes", "Commits" and it then had an area where I could Publish the project to a URL. I took that URL such as: https://myapps.visualstudio.com/DefaultCollection/_git/MySolution and then clicked "Publish" (I had to do it twice.) I can now commit to the TFS and view my code online.
I had the same issue. I had to delete all of my remotes in .git/config (not just origin) before the Publish option is available. Apparently, Microsoft assumes you would never even dream of using a different remote.
I found it helped to start a new solution and publish from there going step by step.
Once it's 'confused' itself it's best to start the process over. I got it working and never had to edit that file.
I tried all of the above but the only way I could get it to work was to use git hub for windows.
To make that work you will need to set up alternate credentials. https://tfs.visualstudio.com/en-us/home/news/2012/aug-27/
For submitting an existing local repository to TFS-Git:
Create new project in TFS.
Using Git Extensions, select the local
repository that you want to push to your new project in TFS.
Select the push arrow.
Select Manage remotes.
In URL, enter the location of your TFS project: https://[your site
name].visualstudio.com/DefaultCollection/_git/[Your project name]
Save. Do you want to automatically configure push and pull? (I said yes.)
Close.
Select dropdown box for Remote - select the Remote URL you just
saved.
Push.
While setting up my account at TFS, I did set up an alternate credentials, though I am not sure if they were needed for this process.
I am new to GIT and TFS, but this process allowed my to push two of my solutions, each with three projects into TFS. Also, within Git Extensions, I found that I could organize my local repositories into categories, which proved a convenient way to organize my projects into their solutions. I would like to do the same in TFS, too.
I had the same problem today, I was not understanding why this "Publish to..." menu didn't appear.
I found that it's because you have to map one online repository to a local one, no more.
In your example, it seems Gittyup online is already mapped to Gittyup local, so you have to create a new Git project in the web interface, then you connect to it in VS, and then you can publish your local repository to the online one.
In the Team Explorer window find your repository under Local Git Repositories. Right click on the one you want to change and pick Open Command Prompt.
Now type git remote -v and it should show you the remote name and the complete url for it.
type git remote remove origin assuming origin is the name of your remote repository. Then git remote add origin [url] replacing [url] with the actual url of your repository.
Now you should be able to push your master branch into the repository for your team project.
I can confirm other answers, that the GIT repo cannot have any remotes listed or VS13 won't add it to the team project. I was using Atlassian tools Stash / Bitbucket / SourceTree and as soon as I closed VS13, removed all the remotes, reopenened VS13, opened the team project, and right clicked on my local GIT repo. The option "Publish to {teamProject}" was available and the .sln was then available by opening the team project.
Same problem here, except instead of editing git config files, just delete the entire git repository folder for the project. Reload the project and start over with Source Code action under file. Then add all changes to the project to the local Git. Then "Sync" and it will display the url textbox.
Create the project in VSTS/GitHub/somewhere, then from Git Bash...
git remote add origin https://xxx.somewhere.com/_git/xxxProjectNamexxx
git push -u origin --all

Why is my Git Extensions Graph totally gray and how can I fix it?

I am using Git Extensions with Visual Studio 2010. My repository is on Bitbucket and I am using SSH and PuTTY to push/pull.
When I open my project and click on browse repository, the first thing I see is a window with a message that starts like this (
Along with two buttons for "Edit .gitignore" and "Commit"):
There are no commits made to this repository yet.
If this is a normal repository, these steps are recommended:
-Make sure you have a proper .gitignore file in your repository
-Commit files using commit
If this is a central repository(bare repository without a working
dir):
-Push changes from another repository
My working directory is set (in a drop down) to a local folder on my computer and the current branch is "master" (also in a drop down).
I can push, pull and commit changes and they will show up in bitbucket but the graph does not show up.
There is another drop down on the right side of the Git Extensions window that has "Branches:" as the label.
If I select "master" from the "Branches:" drop down then I see the graph but everything is gray.
I tried deleting my local repository and re-cloning it from bitbucket and nothing changed.
The graph looks the same as if I were browsing a remote repository... all of the branches and nodes are gray.
Also, I cloned the remote repository as a personal repository... not a central one... and when I first created the remote repository I did it as a central repository.
This does not seem to be a common issue... either that or I did not know what to search for on google.
Thanks in advance.
Edit:
The video at this link http://www.youtube.com/watch?v=cFbCusX9bKs created the repository differently than I originally did..... when I tried it that way it worked..... The difference was that you clone a fresh and empty Bitbucket repo to an empty directory as a personal repo then drop all of your project files into that folder and commmit then push to Bitbucket.......
It could be that my problem was that I created a central repo from an existing project and then pushed it to Bitbucket..... I hope this is useful for someone else.
The video at this link http://www.youtube.com/watch?v=cFbCusX9bKs created the repository differently than I originally did..... when I tried it that way it worked..... The difference was that you clone a fresh and empty Bitbucket repo to an empty directory as a personal repo then drop all of your project files into that folder and commmit then push to Bitbucket.......

Starter Questions for Using Git Windows Version with Git Source Control Provider

I was using "Tortoisesvn" to take control of my programs's source code. But sometimes, I had problems/bugs while using it. So I decided to use "git"( http://code.google.com/p/msysgit/ ) Also, I'm using git with "Git Source Control Provider" visual studio plugin. Source control is very easy with this extension.
So now I have few noob questions...
1) Where is the main repository? Where is the folder that my project's files backup?
2) Is this program working completely offline? I mean how secure is that? Are there any changes that someone can steal your files( repository/source codes etc. ) ?
Thanks for any input*
Best Regards,
Git is different from SVN in that Git is a DVCS - Distributed Version Control System. That means every "working copy" is a full blown repo. Repos can talk to themselves and there is no need for a main repository ( but usually there is a main or "blessed" repo that is the central.)
So when you created a Git "working copy", you created a repo. You setup another repo on different maching / server and push to it if needed.
I don't know what you mean by "backup", but the metadate for git will be under the .git folder ( it will be hidden unless you have selected to show hidden files and folders in Explorer)
Another feature of DVCS that results from having full blown repos and no main repos is that it works offline. You get full history and you can commit without contacting any server etc. Again, I don't understand why you would ask about security in this context? If it is offline, wouldn't that be the most secure? And Git has lots of security and integrity mechanisms.
Git doesn't work with a centralized "main" repository. Each repo is considered an equal to every other repo.
Git can work completely offline (unlike some other source control systems), but in order to push changes to other repositories you'll of course need to be connected in some way to the machine where the remote repo is hosted.

Resources