vagrant-Git repository - github

I'm using vagrant to clone my git repository. I deleted my repository from GitHub my git account. now trying to clone a repository couldn't error message is destination path already exist. how do I delete this already existing path and start afresh?

Similar to this answer, you can:
test if a folder exist (File.directory?(directory))
delete it, using FileUtils.rmdir(disks_directory) (as used in this Vagrant script)

Related

"Not in a git repository" error in git-lfs

I have a over 100 mb csv file that i would like to upload to github using lfs. However, i am facing this issue (Screenshot added). I have put the csv file in the local folder where the repository is located.
enter image description here
You have to init a new repository or clone an existing repository first.
The directory must have a .git folder to be able to run git commands. To create one, run git init and then you would be able to continue.

Having trouble copying a github repository onto my unix machine

I am trying to copy a github repository into my "documents" folder on my macbook pro but have continually received the error message below. I am brand new to github and am using it for the odin project. Any tips or tricks to work through this obstacle? Thank you.
Collins-MacBook-Pro:~ collinremmers$ cd documents
Cj-MacBook-Pro:documents cj01$ git clone git#github.com:cjremm01/git_test.git
Cloning into 'git_test'...
/Users/cj01/.ssh/config: line 3: Bad configuration option: identifyfile
/Users/cj01/.ssh/config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Try to clone it with the URL and not via SSH
git clone https://github.com/cjremm01/git_test

How to solve an error while cloning a github repository

I have a repository in github. But I can't clone it. Whenever I try to do so, it says.
fatal: destination path 'repo_name' already exists and is not an empty directory.
before anyone starts saying it is an empty repository, I'm saying it a repository which has files
any answer is appreciated
thank you
This message says that you already have a folder with your project name on the clone destination.
For instance if your GitHub URL is https://github.com/user/myProject.git, by default the clone command will try to create a directory named myProject.
Check the folders of your clone directory or change the name by doing :
git clone https://github.com/user/myProject.git MyNewFolderName

Creating new git repository, can't add directory

I am about to throw my laptop through a wall, and am hoping for help before reaching that point. For reference, I am following these instructions exactly - https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/.
I have a directory ".../path/thisdir". Inside of thisdir are (1) a file called Demo.R and (2) a directory called sportVU. sportVU is a directory with ~15 files in it.
When I follow the instructions in that link, my github repo looks like this:
https://github.com/NicholasCanova/packageSportVU
Notice that the sportVU directory link cannot be clicked in github, and when I download the repo, sportVU is an empty folder. Why is this happening? This shouldn't be so tough.
EDIT: this is what the repo looks like in my local machine, I'm 100% sure it's not empty:
It could be that you have two .git folder in your directory. View hidden folders to see.
Similar questions:
What does a grey icon in remote GitHub mean
Why can I not open my folder in GitHub?
Since Git doesn't store empty folders the steps you should follow exactly are:
Delete the old repo and start again following exactly my steps.
git clone <repo url>
Inside the folder of the cloned repo create a directory manually and name it as you want i.e sportVU.
Drag and Drop all the files you want in the sportVU direcrory.
cd to Myrepo/sportVU and type git add *
type git commit -m "added some files"
git push -u origin master.
and you should be all set

How to set up ssh communication with Bitbucket using Mercurial?

I am following this tutorial on establishing the ssh communication.
Everything goes fine until I get to:
Step 7. Change your repo from HTTPS to the SSH protocol
I have no idea what the first step means. I have no .hg folder and if I create one using hg init, there is no hgrc file in it.
I came to a new location and I want to clone repositories from Bitbucket using ssh to start working.
Also I have no idea what is meant by myquotefork. It does not appear in the previous text.
If you simply just want to clone an existing repository from Bitbucket using SSH instead of HTTPS, that is quite simple. From the command line on your local computer (where you want the repository cloned to), write the following command:
hg clone ssh://hg#bitbucket.org/claims/nodatime
You will now have the repository cloned to the nodatime folder. And inside the nodatime folder, you should also have a .hg folder containing a hgrc file with the content described in point 3 in your question.
I haven't read the tutorial you're following, but point 1 expects that you've already cloned an existing repository. The .hg folder is created when you initialize/clone a repository. The hgrc file inside this folder is however only created when you clone an existing repo (and not when you just initialize one), which is probably why you didn't see it.