top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

I wanted to avoid push if any of the files is deleted from local git clone area. Can anyone please help me with that?

+1 vote
546 views

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

posted May 16, 2016 by Parveen

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
It's not clear where exactly you want to prevent such pushes.

Do you mean rejecting them in the receiving repository or your local one?
Rejecting them pushing to remote central repository.
I do understand the intent.

*Where* do you want to reject such a push: on "our" side -- which does pushing -- or on "their" side -- which receives our push?

Similar Questions
+2 votes

I've been trying to figure out why I can't push from a shallow clone (using --depth) to a repository. I've made simple examples where it works, but I've read that in doesn't work in every case. However, I can't come up with a case where it doesn't work. Googling gives this answer: http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone,

but I don't completely understand the explanation,Please explain.

+3 votes

My company is upgrading the laptops and so, they're selling the old ones. The problem is, we've been using the old laptops to access remote git repos and the employer would like to clean all possible traces of repo URLs that have been accessed in these laptops. How do I do this? We used Git Bash and Conemu. Will uninstalling Git Bash and Conemu be enough to delete all repo URL history in the laptops? or are these repo URL never been saved to local disk in the first place?

+3 votes

Does someone know where the files after a "git rm" go? Some of my files where deleted by git, of course I have no copy, I tried several file recovery utilities, but so far none of them see the deleting files.

I am running Windows 7; git 1.9.4; gitextension 2.48.03

Full story:
One week ago I created a new repository from an old CVS server. I checked it out from scratch (clone it), into CLONE, and copy the .git folder into a folder, MyFolder, containing some changes that were not pushed under CVS. So far everything ran fine, I could pushed the new changes.

However, MyFolder contained also a a folder called Perso with some files I did not want to push. Therefore I added Perso/* into .gitignore. Then the folder Perso disappeared as potential commit. So far so good. Then I don't really remember what I've done, maybe clean some branches? but yesterday I remarked that Perso/ was no more on the disk.

Currently there is no stash, no other branches. I tried a menu (under GitExtensions) "Repository/Git Maintenance/Recover lost objects" with option "print out objects that exists but that aren't readable from any of the reference nodes"... without success. I suppose git removed my files when switching the branch? Hence my question, is there a change I could get these files back? I am afraid they are lost... what a silly situation.

0 votes

I have tried some methods introduced in the network, but always failed. Some big files committed by me to a very old branch then the files deleted and new branches were continuously created. Now the checkout directory has grown to about 80 megabytes.

What's the right way to permanently erase those garbage big files?

...