Questions tagged [.git-folder]

The .git folder contains all the information related to the project's Git version control history and metadata.

The .git folder contains all the information that is necessary for your project in version control, and all the information about commits, remote repository address, etc. All are present in this folder. It also contains a log that stores your commit history so that you may roll back if necessary.

39 questions
5
votes
1 answer

Colour shapefile using multiple attributes

library(raster) admin <- getData('GADM', country='FRA', level=2) set.seed(123) id <- data.frame(ID_2 = admin@data$ID_2, day1 = sample(1:20,96,replace = T), day2 = sample(50:80,96,replace = T), …
89_Simple
  • 3,393
  • 3
  • 39
  • 94
4
votes
1 answer

How to delete directory with .git folder in Python

I am trying to create a program to help with my backups. It works by copying a project to a backup location. Before copying it does some checks. I check to see if the folder has been backed up previously, if it has I need that folder delted before…
Kvanrooyen
  • 45
  • 1
  • 8
4
votes
3 answers

How can I safely commit a .git directory

I am working on a git-related software and I have included unit tests in my code. I have created a test git project (under a subdirectory) to be used by the tests: resources/test-git-project This test git project is not associated to any remote,…
Marinos An
  • 9,481
  • 6
  • 63
  • 96
4
votes
2 answers

Why does Git store the file in the repository when I just add it to the staging area?

From what I understand when you git add a file, it merely stages the file before adding it to the repository but why can I see it added into the git repository before I've committed it? For instance, if I create a new git repository and create a new…
Asad Moosvi
  • 487
  • 5
  • 18
3
votes
0 answers

Error: could not write config file ,Resource temporarily unavailable and warning: unable to unlink

Git issues when cloning any repo. Resource unavailable and when trying to check out new branch every file contains warning of : unable to unlink. Searched for solution and couldn't find anything with this exact issue. My git version is: git version…
Zoidburg
  • 159
  • 8
1
vote
1 answer

What are the references within Git's pack/ and info/ folders?

I have read the relevant git documentation: https://git-scm.com/book/en/v2/Git-Internals-Git-References I have not found any information about the .git/objects/refs/heads/info directory; though I understand that .git/objects/refs/heads/pack is for…
1
vote
1 answer

Which folders I should put in .gitignore file after creating a project with Clion?

When I run a program with CLion, I have the below directories and files generated automatically except Problem Details.txt Mode LastWriteTime Length Name --------------------------- d----- 10/1/2022 3:48 PM …
XmM14
  • 11
  • 2
1
vote
1 answer

How do I delete a mistakenly-migrated .git directory from the tree of a Git repository?

Several months ago, we migrated a bunch of Subversion repositories to Git using svn-all-fast-export. (That information explains how this directory got in the Git directory in the first place, but probably isn't pertinent to removing it.) Today, one…
Nick Williams
  • 2,864
  • 5
  • 29
  • 43
1
vote
2 answers

npm ERR! husky - .git can't be found WINDOWS

I'm trying to install mattlewis92's angular 14.0+ calendar, which suggests the use of the command ng add angular-calendar. However when doing so I got an error: npm ERR! command C:\Windows\system32\cmd.exe /d /s /c husky install npm ERR! 'husky' is…
Naydenow
  • 21
  • 1
  • 5
1
vote
1 answer

Git ignore not removing files from my Repo

Already tried doing git rm --cached dir/file and it did not work. It only works with the VSCode interface(the source control extension). I'll add a file to .gitignore git add . git commit -m "trying to make .gitignore work" git push And no…
1
vote
0 answers

Updating git submodule inside a submodule

I have a submodule inside my repo for example repo/submodule1. Inside submodule1there is another submodule, example: repo/submodule1/submodule2. Do I have to checkout and commit changes in submodule1 to get submodule2's changes? I'm wanting changes…
bilumer
  • 7
  • 2
1
vote
1 answer

Will a github token leak when running github actions

I'm running Github actions workflow in a private repo, and it pushes changes in a public repo. I'm providing my GitHub token in the private repo for the workflow github actions. Will my token leak in my public repo .git? Can somebody clarify this?…
Spooky
  • 205
  • 1
  • 2
  • 7
1
vote
1 answer

Git: What's the path separator used in the content of the .git\HEAD in Git repositories on Windows?

The title says it all, but for example, if the HEAD of a Git repository points to ref/heads/master on any well-used Git implementation for Windows, which of the following is the content of the file .git/HEAD ... oops, .git\HEAD: ref:…
gksato
  • 368
  • 1
  • 10
1
vote
0 answers

Retrieving the packs filename

I hope you are doing well. I am faced with a challenge, I have to retrieve the pack-*.pack filename from a git repository freshly cloned from remote: - Without being able to list the contents of a folder - There is no .git/objects/info/packs - There…
Melardev
  • 1,101
  • 10
  • 22
1
vote
2 answers

Overwrote .git directory, recovering state from objects

I careless copied .git from one project (A) to another (B), with a remote scp -r (A) (B). I would like to recover a usable state of the git repo. I can remove (A)'s .git objects. From there, how can I best go about finding tips of git branches and…
mcint
  • 804
  • 8
  • 18
1
2 3