GIT hooks custom script to commit and push changed files to some different repository and specific branch during every commit.


I want to write a git hook in bash script in which following should be achieved:

* Extract the files which are being committed.

* C lone a predefined repository (which is different from the targeted repository for commit) to /tmp location.

* Copy extracted files to checked out repository.

* Detect if there is any conflict. Try to auto resolve the conflict.

* Commit changed files from /tmp/ and push changeset to git server.

I tried to write a small prototype but somehow it seems that directory is always referred from base repository and not from /tmp/ and all added files to /tmp/ are shown as deleted.

I am attaching that file for reference purpose.

There are bunch of tasks to be done as we are improvising our deployment systems and automating it entirely. So selected Freelancer will receive ongoing tasks related to Continuous Integration.


To explain in terms of layman:

Lets say user initially cloned https://github.com/myproject in /home/jatin/work/myproject directory

he added two files a.txt, b.txt into it

so now he attempts to commit git commit -m 'jiraid-1234' a.txt b.txt

here git hook should be trigerred which should:

1. git clone from https://github.com/otherproject into /tmp
2. copy these two new added files i.e. a.txt and b.txt into /tmp/otherproject directory
3. commit added files in step 2 and push to https://github.com/otherproject

4. and at the end of this orignial commit which was supposed for https://github.com/myproject should go through

Habilidades: Bash Scripting, Git, Desenvolvimento de Software, Administrador do Sistema

Veja mais: i want write my name in different style, script push folder rights files, script push files, php script email changed files, cms custom script, script combine php files, check files different, script whm skeleton files, wrt custom script, bash shell script find move files, script move log files check name, linux example script delete owner files, perl script find identical lines different files, php script send attached files, script checks changed values csv, script compare xls files

Acerca do Empregador:
( 6 comentários ) Jodhpur, India

ID do Projeto: #16490549

4 freelancers estão ofertando em média $114 nesse trabalho


A proposal has not yet been provided

$100 USD em 1 dia
(214 Comentários)

Hello there, We can write the bash script to achieve all your requirements and make it working properly. We are a team of server administrators having many years of experience in the field of Linux administration Mais

$235 USD in 3 dias
(133 Comentários)

hello having worked with git, it is safe to say that conflicts cannot be resolved automatically, because finding the code that needs to be preserved is quite difficult from a bash point of view. The other things ca Mais

$84 USD em 1 dia
(102 Comentários)

A proposal has not yet been provided

$35 USD em 1 dia
(1 Comentário)