top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to know when git is finished

0 votes

I have a shell script what does a "git clone" and then some operations on the repo cloned. It works fine when run from the command line.

However, if the very same script is added to cron then what happens:
1. Cron starts the script
2. Script invokes git clone
3. git clone spawns several "git-remote-https" processes
4. git returns while the spawned processes run
5. Commands based on the repo fail (if I add a sleep 30 before running the commands then success, but that cannot be the right path)

How do I make sure that a git clone is actually complete when running from cron OR how do I make git run synchronously so that it does not return control to the bash before it is really done (nohup did not work because of the detached spawns)?

posted May 25, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
+5 votes

I know form the "git log" we can now the commit time, but how to know when it is in the remote git server.

0 votes

I have two commit in different branch, the commit-id is different, but and the content is the same, is there a method to prove its the same use one-liner.

+1 vote

I'm having difficulty understanding how I should use git when I have multiple independent changes in a project. I have a local git repository for various windows & linux machines and I work on different parts of the project on different machines. The situation I have is that I am part way through some changes on one part of the project. On the same machine, I have made some quick changes to another part of the project and I would like to commit those changes and push them to the origin, _without_ having to commit the other changes that I am still working on. Surprisingly, I don't seem to be able to do this with git.

  • I can commit the completed changes without committing the uncompleted changes ok.
  • If I try to push the changes, git complains that I have unstaged changes and I should do a local merge.
  • I can't even seem do a local merge without pulling other changes from the origin.

So now I've ended up with part-finished changes on the master. Not what I wanted! What should I be doing here?

+1 vote

We have a git server, all our team members can push to it, with the following command being executed in repository on git server, we can find out when a commit is pushed, except for tag, so my question is, any other way to find out when a tag is pushed to a git server?

git config core.logAllRefUpdates true

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.