Skip to main content

All Questions

Tagged with
0 votes
1 answer
26 views

git archive by adding 1 folder level

Hi I would like to archive my git repo: git archive -o rpda.zip HEAD however this command creates a structure like: rpda.zip |____files_in_the_repo while I would like to add a folder level like this:...
Alberto B's user avatar
  • 491
1 vote
3 answers
3k views

git download a file from a private repo

I want to download a file from a private repo. I want to do this with "git" (not gitlab/github api). Git provide this way https://git-scm.com/docs/git-archive. You can fetch a file like this ...
mnr's user avatar
  • 103
1 vote
1 answer
685 views

Git archive adding not versioned file to subdirectory

Trying to make zip archive with such command git archive -v -o app.zip --add-file=.env --add-file=.ebextensions/my-scripts.config HEAD 2 not versioned files are added via --add-file option. Problem is ...
AndreyK's user avatar
  • 13
1 vote
2 answers
932 views

Running "git archive" in Azure Git gives error message

I am trying to pull a single file from an Azure Git repo. But if I run this: git archive --remote="ssh.dev.azure.com:v3/[organization]/[project]/[repo]" master myfile It returns an error: ...
twasbrillig's user avatar
  • 18.6k
1 vote
1 answer
524 views

Any way to turn all git branches into folders for a repository?

I have several branches in a git repo. -repo -- branch1 -- branch2 For some reason I need to move the repo into another repo without histories. As branch1 and branch2 differs in code so it would ...
Sazzad Hissain Khan's user avatar
0 votes
3 answers
322 views

Remove files from disk but keep Git clone directory; archive local repo

User-Story Say I've cloned a project and pushed my work and I'm done with it for now. I expect I may need to go back to it, so I'd like to keep the clone locally to quickly switch back, but there is ...
Rafe's user avatar
  • 2,055
1 vote
0 answers
749 views

git archive error "fatal: pathspec 'Working Report/RPT0057/RPT0057_sub_succ1.jrxml' did not match any files"

when I run the command git archive, it return error "fatal: pathspec 'Working Report/RPT0057/RPT0057_sub_succ1.jrxml' did not match any files' , why? I google and some said this error is still to the ...
user1169587's user avatar
  • 1,210
1 vote
1 answer
939 views

How to create a git diff/diff-tree/archive between 2 commits with versions of files at exactly this point (not head)

If I want to compare and export 2 commits in the past against each other, I can do a git diff to list all modified files, so far so good. But if I want to archive those files at exactly the version ...
soulectro's user avatar
1 vote
2 answers
445 views

Exclude folders from Git code search / create archive branches

TL;DR version Files in a certain folder are cluttering my search results when I search on GitHub. I only need those files for their archivational purpose, so although I don't want to remove them, I ...
GolezTrol's user avatar
  • 116k
0 votes
1 answer
486 views

How to get zipped all changes from specified git branch

I would like to get all changed files from git's specified branch in git file. So I'm changing branch to branch1 and then fire command: git archive -o branch1.zip HEAD $(git diff --name-only HEAD^) ...
piotrassss's user avatar
4 votes
1 answer
691 views

git archive --remote command using GitPython

How can I use command (git archive --remote) using GitPython? As per the GitPython docs we can use git directly. I am doing something like: git = repo.git git.archive(remote= 'http://path') But ...
HCH's user avatar
  • 49
3 votes
1 answer
2k views

Git archive a directory without the directory path

I've found a few references of how to do this with the 7zip cli: https://superuser.com/questions/340046/create-an-archive-from-a-directory-without-the-directory-name-being-added-to-the?utm_medium=...
contool's user avatar
  • 1,074
1 vote
1 answer
1k views

git archive files with whitespace in their names

git 'archive' command stops with the following error: fatal: pathspec 'path to file' did not match any files. Trying to wrap file paths inside quotes or double quotes does not solve the problem: ...
Hamed's user avatar
  • 279
0 votes
0 answers
19 views

Create archive for difference between tow tags with git [duplicate]

I'd like to create archive, with only modified files, between tow tags with Git, it is possible ? I suppose it start with : git archive -o update.zip ...
antoine's user avatar
  • 45
-1 votes
1 answer
646 views

Get only the new and changed files and folders [duplicate]

I want to create an update package (ZIP archive) with only the changed or new files and folders after the last release or specific commit. How can I do this with Git (my repo is on GitHub)?
jnessier's user avatar
  • 141

15 30 50 per page