How to use a downloaded Bitbucket Reporsitory in Pycharm - frameworks

I have a repository that is in BitBucket here are the two things I want to do.
1. Download the repository and use it in Pycharm.
2. Directly connect to the repository in Bitbucket.
I have a testing framework that is in the repository but I can't figure how can I use that framework in Pycharm to write my test cases.

Related

How to migrate Mercurial hg repo to GitHub using online import engine

I am trying to use the online (official) GitHub import engine to migrate this Mercurial repo http://hg.code.sf.net/p/amide/code/ to GitHub. However, I get the following error:
No source repositories were detected at http://hg.code.sf.net/p/amide/code. Please check the URL and try again.
Any idea about what I am doing wrong?
Steps to reproduce:
Go to https://github.com/new/import
Paste in the clone url http://hg.code.sf.net/p/amide/code
Click on begin import
Apparently, the GitHub online importer is not compatible with some Mercurial repository servers.
Instead, one has to use the command line, see:
https://help.github.com/en/github/importing-your-projects-to-github/source-code-migration-tools#importing-from-mercurial
I used the nice conversion script from this repository: https://github.com/frej/fast-export
and was able to get the repo cleanly converted into https://github.com/ferdymercury/amide

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.

How to create a repository in github.com using gitpython package

I have tried to create a repository in github with my python program. I found gitpython package in web-search. I can able to pull repository but unable to create a repository in github. please help me.
Git and GitHub are different things.
The former is an open source distributed version control system. The latter is a commercial entity that provides products and services supportng Git. (Confusingly, it is also the name of many of those products.)
There is no way to create a repository on GitHub using the standard git command-line tool.
From GitPython's PyPI page:
GitPython is a python library used to interact with Git repositories.
No mention is made of GitHub, and in general git and GitPython can do basically the same things. If you want to create a repository on GitHub you could use any of the libraries listed here.
Alternatively, you could use their API directly, by POSTing to /user/repos. This method will require you to authenticate, and in my opinion using one of the libraries from the previous list is easier and more robust.

Unable to integrate Github with Pycharm

I have created a repository on Github. I am using Windows 7 64 bit and Pycharm Community edition. I want to integrate the Github repository with pycharm but I am getting the error
Couldn't get the list of GitHub repositories
Connect to api.github.com:443 [api.github.com/192.30.252.127] failed: connect timed out
Although I am able to clone he same repository from command prompt using git clone command.
I had the same issue.
Configure your proxy if using one:
File->Settings->System Settings->HTTP Proxy
Another thing to try is to clone the project locally then add as new project in Pycharm. Afterwards I was able to do all git operations under VCS->git including add/commit/push for my project.
try to check whether you have given the path to Git executable correctly by testing it using test button next to it...(file>settings>version control>Git>path to Git Executable)
make sure you have given the git client path correctly..
C:\Program Files\Git\cmd\git.exe

Newbie Unable to clone repo

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.