Newbie Unable to clone repo - version-control

I've never used a VCS before and I'm attempting to set one up now.
I'm doing some Game Development with Unity3d. At first I googled how to set up VCS for Unity; and I found this: http://www.gamasutra.com/blogs/BurkayOzdemir/20130303/187697/Using_Unity3D_with_external_VCS_Mercurial__Bitbucket_step_to_step_guide.php
I followed it until it came time to clone the repository from within the hgTortoise workbench. When I hit the clone button after copying and pasting the URL to my repo from the BitBucket.org website I received an error: "Repository Git clone https:://username#bitbucket.org/username/projectName.git not found code: 255" and I do understand what an HTTP 404 error is.
Anyone who has used the internet knows it means the page could not be found.
I created this repo as private; is that why it could not find my repo?
Then I proceeded to follow the instructions at BitBucket's "BitBucket 101" help page. I installed Git, had already created a BitBucket account and repo, and the instructions which followed.
I stopped at the point where the help page said to enter some command line things in to Git Shell. I'm running Windows 8.1 and searches have shown me that particular program doesn't exist on this PC.
Am I doing this correctly? What am I doing wrong? All I need is to set up a VCS.

Git and Mercurial are 2 different distributed version control packages. They both use a command line interface. TortoiseHG (the package referred to in the step-by-step you linked to) is a GUI extension that's only used for Mercurial. (HG is the chemical symbol for Mercury, get it?!)
Bitbucket is an online repository that can host either Git or Mercurial repositories.
It looks like you created your repository on Bitbucket as a Git repo and not a Mercurial repo. Just delete the repo on Bitbucket (make sure you have a good copy of your source code) and recreate it as a Mercurial repo. Then work with TortoiseHG as instructed in the step-by-step.
The fact that it's a private repo doesn't matter. That just means it will only be visible to you (vs. everyone) and will require a password to push and pull changes via https or ssh.

Well, first of all, it seems that the tutorial that you seem to be using is based on using Mercurial instead of Git.
If you're comfortable with diving into the command line, you can download TortoiseHG, which is a Windows shell extension: http://tortoisehg.bitbucket.io/
However, there's nothing wrong with using SourceTree as well, which is a GUI-based interface for dealing with both Git and Mercurial repositories: https://www.sourcetreeapp.com/
FYI, if you downloaded Git for Windows, it should've provided you with a terminal called Git Bash that you can use for Git commands.

Related

How to manage Django Project and its modules with git?

I've been looking for a solution how to manage my project with git for quite some time now. I want to have one instance as the main repo for connecting the entire project. Each app should be its own git instance.
During my search I found both git submodule and git subtree. For both tools I found an instruction how to insert an existing reppo. However, I am interested in how to proceed from the beginning. I mean here from the command $ django-admin startproject myproject Where do I enter the git init? When I create a new app
$ django-admin startapp new-app and how do I use this as subtree/submodule?
Until now I have always found instructions that refer to a remote repo. Is this always necessary? I am not sure if I want to publish every Django app on Github. But I want a version control system just for me. Is this possible?
I have to say that so far it has been enough to manage my "projects" locally. Now I want to work together with others and I don't want to install the whole Django Project locally but only provide me with single functions or modules.
It would be a great help if you could explain to me how that works.
TL;DR
How to manage (start and expand) a Django Project with git. The apps should be their own git repos.
The purpose of submodules is to allow you to graft an existing repo/library into your git. Rarely do you want to do this. Instead you want to use PIP tools to install your libraries as part of library management.
This is essentially a git question. If you don't have a remote repository, you can still use git. With that said, the reason you want a remote repository is so that you can collaborate with others, and have a stored version of the code separate from your workstation.
There are services that let you have private repos even without a paid account. Bitbucket is the most well known of these services and is comparable to Github in most ways.

Using Team Services online repository without visual studio

I am trying to use a team services account to store other related documents for a project such as some spreadsheets. I want the client to have access to it, but they are not programmers so I am not wanting them to use VS.
The client can access it directly without a problem and can download files, the biggest issue is they will need to be able to upload files as well. Without using a client of some sort they are limited to 10mb or less which won't work for them.
I cannot seem to get github for the desktop to access my online repository unless I first go into VS and clone it.
I am trying to avoid having to walk the client through doing that and would like to be able to use a GUI like github desktop from end to end.
We are all in a Windows environment.
I can create a new repository in github desktop, but cannot seem to figure out how to connect it to my remote (I can't find the URL for the remote anywhere).
I feel I am so close but just missing a couple items, any push would be appreciated.
GitHub Desktop is for GitHub. GitHub is a Git repository hosting service. Not surprisingly, the GitHub tool only works with GitHub.
You can use any general-purpose Git client to interact with VSTS Git repos. SourceTree is good.
You can use some git GUI or git command line to operate local repo.
Git GUI: as Daniel Mann said, you can use soucetree, or tortoiseGit etc.
Git command line:
you can download git here ->
git clone https://account.visualstudio.com/_git/projectname ->
enter email and password to clone ->
git add . (when you add some files) ->
git commit -am 'message'(commit the changes you make) ->
git push(push your commits into VSTS git repo) ->
git pull(pull VSTS git repo changes to localt).
I am just closing this out, thank you to both folks who did answer. I understand that I am using GIT and that GitHub Desktop is for Github. I was looking for the best way to work with a Github repository without using VS and how to access the team services repo for a client of mine. I set him up with Gitkraken which is working. I was never able to figure out how to get Github Desktop to properly clone and push items, but I did not spend a ton of time in it once I used Gitkraken.
Thanks again for taking a swing at it.
I accepted the answer I did because suggesting using the command line at least shows a understanding of my question and what I was looking for.
I know I am late to the game but I can confirm that tortoise git and getext also work fine with VSTS

Rstudio: Changing origin for git version control of project

I originally set up git in Rstudio while enrolled in the Data Scientist's Toolbox course at Coursera. Unfortunately, I did this in my phd project. The repository no longer exists on github. I am now attempting to write my thesis in rmarkdown using knitr and bookdown. I would like to use version control, both to learn proper git workflow and to have a structured back up of everything I have done in my thesis. However, I have been unable to change the version control repository in Rstudio.
I am unable to change this in the Tools > Version control > Project setup > Git/SVN menu. The Origin: textbox is unchangable.
I tried creating a new project using the old phd project's working directory. This also cloned the version control settings.
How do I change the origin to accomplish what is described above?
Git, Github and Rstudio are different things. You could use git as local version control tools. You might connect your local repo to Github account which is based on git by push/pull. Rstudio just makes a user interface for git and supplies the function to push the repo into remote server based on git to make version control(not only Github, but also Gitlab).
So for your issue, if you do not want to pay for github for a private repo, all of your code would be public and I don't think it is good before your finally finished your thesis. But version control could be made locally with git only. Just use git shell to control the version.
However, as a student, github could support private repo here for you. Just register and find your student package. Then just remove the url for remote repo after you cd to your workdir in command line, use the following code to find your remote url(mostly you might fing origin):
git remote -v
Then use this to remove them:
git remote rm origin
Now you could use version control locally. If you want to connect this repo to your remote github private repo, use this:
git remote add origin https://github.com/[YourUsername]/[YourRepoName].git
RStudio would find this information about git and support your following operation. Project in RStudio is different with git, although project support git as version control tool. So you need git in command line or shell to solve your problem.
This can be done by opening /your.project/.git/config
and editing the remote origin line(s), e.g. changing from git to https.
Restart Rstudio & you'll be prompted for your github username & password.
This is what worked for me for migrating from github to Azure
Go to the top right Git window in RStudio and click on the gear. Now click Shell (to open the terminal there).
#remove origin
git remote rm origin
#add new origin like Azure for me via HTTPS
git remote add origin https://USER#dev.azure.com/USER/PROJECT/_git/REPONAME
#push your local repro
git push -u origin --all
#in my case put in the PAT password if you needed to generate one.
After testing, I found some clue
Actually Rstudio is not really smart about this setting
It will first search for the git file in the Rproject folder where your Rporject file is located
if it could not, then it goes up to the folder contains your Rproject folder
However, for version control you only need coding files while RProject may contains some big files like .RData some pictures etc.
I don't find a way to manually disrupt this logic flow, the only thing you can do is to delete the current git repository setting files(which is .git folder and 2 other git setting files), then Rstudio may ask you if you want to init a new one.

How to integrate LazyBones with VCS?

I just learned about LazyBones and absolutely love it! The problem is that it generates a "code skeleton" for you before your app's VCS repo exists. And I see there is some integration capability with Git, but what about other VCSes?
Specifically, I'm using Mercurial. So ordinarily, I'd create the hg repo for my new app (on the server), clone it out locally, and some code to the cloned working copy, commit & push it.
So I ask: what is the proper workflow (or set of commands) to create a new app from a LazyBones template and integrate it with a new hg repo?
I suppose, slightly more elegant way may be:
Generate skeleton by LazyBones in SomeDir
Init Mercurial repo after it in SomeDir
Add needed files from working directory into (empty) repository
Create remote repo on server
Add remote repository URL into [path] section of local repo's .hgrc (maybe also auth. credential into [auth])
Push

egit plugin for Eclipse

I have created a gitlab repository and followed the installation instruction by the letter and it was successful (i think... i can browse the repository online) and now I want to connect the egit plugin from eclipse to this remote repository.
I was using SVN for quite some time and now we need to switch to git and I am confused. egit only gives me the option to create a local repository but I'm a bit lost on how to push/fetch code to my online repository.
Any advice will be greatly appreciated :)
Thanks!
With Gitlab (working with ssh urls), that means you have to register your public and private ssh key in Egit first before being able to clone it.
See EGit ssh configuration
Then you can clone it.
And yes, you need to clone the full repo locally to work on it, that is the difference between a:
CVCS (Centralized Version Control System) like SVN
DVCS: Distributed Version Control System.
See "Sell me Distributed revision control" and "Describe your workflow of using version control (VCS or DVCS)" for more.
First you need to clone the remote repository using git clone <repository>, then you can import it to eclipse using egit
Or
You can use the clone functionality provided by EGit to clone the remote repo to local system