0

I wrote a laravel package which is being maintained on GitHub. I got a new PC, now I need to clone/download my project in a why that I am able to push/pull changes to my GitHub repository using the command-line.

I created a new SSH key as the documents describes. I tried to download the project with the prefer-source option like this composer require vendor-name/project-name:dev-master --dev --prefer-source

Then, I changed my directory to vendor/vendor-name/project-name. When I tried to do git status just to see if the command works, I got the follow error

fatal: Not a git repository (or any of the parent directories): .git

How can I download a maintainable copy correctly?

I always struggle when using git. I will appreciate a descriptive answer on the right way to download a maintainable project.

Junior
  • 11,602
  • 27
  • 106
  • 212
  • http://stackoverflow.com/questions/6466945/fastest-way-to-download-a-github-project – Tim Biegeleisen May 03 '17 at 01:22
  • Did you spend any time searching SO for help before posting this? – Tim Biegeleisen May 03 '17 at 01:22
  • @TimBiegeleisen sure I did. Why waste my and others time. the URL you provided shows how to clone the repository to use in a project. I want to clone it so I can maintain it by using `git add`, `git commit`, `git push` – Junior May 03 '17 at 01:36
  • `As a convenience, cloning automatically creates a remote connection called origin pointing back to the original repository. This makes it very easy to interact with a central repository.` – Tim Biegeleisen May 03 '17 at 01:39
  • You may be over thinking this: https://www.atlassian.com/git/tutorials/setting-up-a-repository – Tim Biegeleisen May 03 '17 at 01:40
  • Just to cover basics, did you do a git init in the local directory you are working in first? – Webtect May 03 '17 at 01:43
  • @Scott If he clones he shouldn't need to use `git init`. – Tim Biegeleisen May 03 '17 at 01:50
  • 1
    @TimBiegeleisen indeed I am over thinking the problem. This command seems to worked `git@github.com:VendorName/PackageName.git` thank you – Junior May 03 '17 at 01:51

1 Answers1

0

its occurred cause no git detected if you use window 7, to check it if have git go to your

project->organize->folder and search option->view

unchecked hide empty drives in the computer unchecked hide extensions for known file types click show hidden files

try to git remote your project

Sample:

git remote https://aaa@bitbucket.org/masterishere/onlineaaaa.git

Mathew Magante
  • 1,280
  • 3
  • 19
  • 28