Skip to content

stebulus/copy-file-into-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple working example of using gitlib.

To build:

git clone https://github.com/stebulus/copy-file-into-git
cd copy-file-into-git
cabal build

To test, create a throwaway git repo with a branch:

pushd ~
mkdir whatever
pushd whatever
git init .
echo stuff >stuff
git add stuff
git commit -m "added stuff"
git branch some-branch
popd
popd

Then "copy a file into git":

dist/build/copy-file-into-git/copy-file-into-git some-branch README.md ~/whatever/some/place/a-file

The git history in ~/whatever will now show a commit on the branch some-branch adding the file some/place/a-file.

Bugs:

  1. It doesn't understand bare repositories.

  2. If you copy a file into the branch that's currently checked out, the working copy doesn't get updated, so git will claim that the working copy has deleted files.

About

A simple working example of using gitlib.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published