Questions tagged [git-init]

Create an empty Git repository or reinitialize an existing one.

55 questions
0
votes
2 answers

How to un-initialize a git folder in the root of my pc?

I am beginner with git. A few weeks ago, I unintentionally created a "git init" on the root of my pc (location: desktop) which means all of my computer files are on that git folder. How can i delete that git folder, without losing any of my coding…
0
votes
2 answers

Git Error message Permission denied for init

I am a beginner working on a windows computer, trying to push my project on git. When I try to run git init I get my permission denied. Link to my screen shot It just says C:/Program Files/Git/.git: Permission denied . That is what happens when I…
0
votes
1 answer

Why Git gives the error "Resource temporarily unavailable (code: 11)" when simultaneously executing multiple instances?

I have an automated test that tries to clone a bunch of specific revisions from the local Git repository by using the following asynchronous Nim procedure. proc cloneSpecificRevision(downloadMethod: DownloadMethod, url,…
bobeff
  • 3,543
  • 3
  • 34
  • 62
0
votes
3 answers

Problem at initialising a git repository using VS Code

I have created one new file in an otherwise empty directory using VS Code. I went to version control and chose initialising this directory as a git repository. Now, a blue strip is moving around and a blue clock sign appeared on the git icon. What…
Gergely
  • 6,879
  • 6
  • 25
  • 35
0
votes
0 answers

pushing and pulling changes to a remote after using "Download Copy"

Let's say that I downloaded a copy of a git repo using the "Download Zip" option. I started making changes, then realized that the rest of the world might like to have access to my work. After I do a git init, what do I need to do to get the repo…
Hoytman
  • 1,722
  • 2
  • 17
  • 29
0
votes
1 answer

Restore Github Repository

I git init on an existing repository and force pushed it to master. I had an earlier version of repository with few (around 100-120) files of which I don't have a local copy ,Now the whole repository has been over written and I have only 2 new…
0
votes
3 answers

git init --separate-git-dir overwrites the existing .git folder

I have a repo: mkdir test cd test git init touch hi.txt git add . git commit -m 'first test add' git status Wherein I'd like to add a separate git repo to manage different work: git init --separate-git-dir .git2 Running this command, however…
emehex
  • 9,874
  • 10
  • 54
  • 100
0
votes
2 answers

How to create a git repository inside a pipeline as code

I am attempting to move a declarative pipeline from being written in a Jenkins Pipeline Configuration input box, to code hosted in BitBucket so that we have source control for any changes we make to this pipeline. Due to the pipeline as code steps…
James
  • 749
  • 1
  • 9
  • 22
0
votes
2 answers

How to undo 'git add -A' and 'git init', but still keep subfolders in Git?

I mistakenly ran 'git init' followed by 'git add -A' on a main folder (named "workspace"). I intended to 'cd' down into a new project folder (named "authentication") before running these commands. The issue is, this main folder "workspace" already…
BryanH
  • 3
  • 4
0
votes
2 answers

Git status command - entire computer under untracked files

I'm quite new to github. Today I was in the path Desktop/Projects and I made a new directory in it: mkdir CV inside it a ran the command: echo "# CV" > README.md because I wanted to create a Readme file inside the CV directory and just writing…
Gtchweb
  • 49
  • 1
  • 8
0
votes
2 answers

Synchronize a distant server directory with a local git repositery

I want to synchronize a directory /home/myproject of my distant machine with, as source, the directory D:\myproject\ of my local machine. I would like to use git (to also benefit from commits history, etc.) I did this on distant machine (creation of…
Basj
  • 41,386
  • 99
  • 383
  • 673
0
votes
1 answer

Setting up Git via Terminal on macOS High Sierra

I am learning Git via the Pro Git book. To begin setup it tells to open Terminal and execute git init on the project I want to start revisioning. Problem is: this command successfully creates a .git hidden folder only if I execute it in my home…
NotationMaster
  • 390
  • 3
  • 17
0
votes
1 answer

git init re-creates .git file in home directory

I want to keep a separate work space for my development job.I moved .git file from my home directory to another directory named 'workspace'. Now when I use git init in workspace directory, everything works just fine but when I use git init inside my…
0
votes
0 answers

git init in post-receive

i suffered a very bad problem. i want push local repository to remote repository from my client and then excute post-receive script copy to webroot.there is a piece of code in my post-receive as follows: cd /home/james/mywebsite git init git pull…
0
votes
0 answers

Fix a 'git init' issued from the wrong directory without deleting the `.git` folder?

This is very close to both Is there a command to undo git init? and How to fully delete a git repository created with init? Unfortunately, the accepted answers do not fit well because I init'd my home directory. (I missed a cd, and then issued git…
jww
  • 97,681
  • 90
  • 411
  • 885