Revert server to past commit with bare repository hooks
I have a server with a bare git repository that I push to for live deployment. It has a simple
post-receive hook that updates my server code with the latest on
I sometimes need to revert to a specific past commit when bugs are found on the production server (I test myself locally, but I don't catch everything). Is there a nice* way to revert to a past commit with this setup?
*By nice I mean a one-liner like pushing to the bare repository:
git push prod master
This question already has an answer here: Revert to a previous Git commit 11 answers I'm not clear on how git revert works. For example, I want to revert to a commit six commits behind the head
Our team uses Github Pull Requests to manage our workflow, much like what is described here. Upon manually reviewing the accepted Pull Request, we occasionally need to revert that merge because it isn
I need to create a central Git repository but I'm a little confused... I have created a bare repository (in my git server, machine 2) with: $ mkdir test_repo $ git --bare init Now I need to push file
I have ftp server and I cannot install additional software on it. Is it possible to create on it git repository and clone to local pc? I tried to create local repository and copied it to ftp. Will it
I have a GIT repo A which was setup using git svn from a subversion repo. I made a clone of A called B, where B is a bare repository(git clone --bare). I clone C from B, work on C and periodically p
We've got a bare git repository on a server, for a Web portal project. Several programmers, designers, etc... perform dozens of push and pull from/to it. Now we want to test the project on the serve
As you might have known that by default, git doesn't enable reflog updates for new bare repositories. The problem is, I have a long history repository but it was created before I set the flag logAllR
I've pulled code down from my repo which has messed things up. I'd like to revert my entire project to my last local commit. How would I do this?
I have a bare repository. For unknown reasons the /refs/head/master file got deleted. Because I don't know the id of the latest commit, I wonder how can I recover it so that I can recreate the master
I'd like to determine whether a remote git repository (origin) contains a particular commit. My use case follows: I'm preparing to create a public release. I want to include the SHA-1 of the commit re
There has been some question on reverting back to a commit in git but I wanted to make sure. This SO page is one that helps the most: GIT revert to previous commit... how? I have a previous commit, sa
I'm converting a big (with about 9000 changesets) Subversion repository to Mercurial. It is coupled with Trac issue tracking system, so the commit logs have many cross-references to other revision IDs
I'm learning git on Windows, I have installed Git Extensions (Version 2.47.3) and played a bit with it. I've created a bare repository in my C: unit (as a central repository) and a personal repository
I have some hard bug to find. I used git bisect to find the commit, and I reach that commit. I want to make sure this is the code that introduced the bug (I'm not that certain) so I want to temporari
Tried running the --is-bare-repository command but realized that running it on my cloned copy wasn't right. Is there no way to use the same command on the actual GitHub repository? The repository show
I would like to replace my current local repository with an older git commit that i have pushed, is this possible? also i am the only person using this remote repository so messing with other peoples
I accidentally pushed a commit to GitHub. Is it possible to remove this commit? I want to revert my GitHub repository as it was before this commit.
I and a couple of developers work locally on a server, we all connect there via RDP. I've setup a folder in D:\Projects drive, to hold our bare repository. All team members created local copies into t
In subversion I'm trying to commit a project but running into an issue. The error I get is Illegal repository URL '' How come I can run update, but commit on the same tree shows that?
I'm still learning Git's workflow for doing things, and realized that I was accidentally in the wrong working branch when I committed some files. So using EGit, I listed the commit history and selecte
I am using TortoiseSVN on Windows 7 x64. I tried to put a post-commit.bat in the hooks folder of a repository, but it doesn't work at all. So I tried to put a pre-commit.bat (the content is exact the
My web application was working fine at my last commit, i.e.: git add -A git commit -m 'asdf' I don't want to throw away what I have now, is it possible to stash what I have now, revert back to the la
I recently came across the octopress blogging platform and followed the installation instructions. I am hosting it on github using github pages. I created a repository and successfully managed to make
I am trying to configure a pre-commit hook for Appache subversion, which will enforce checkstyle on the java files. I am new to SVN configuration and hooks so I am using a tested on another server hoo
I have installed git on the server. There are already plenty of files in the project directory (www/beta/httpdocs). I want to setup a remote bare repository where I and a few people could push to. We
Is it possible to add new file to Repository in post-commit hooks. When users commit files, the new file has to be added to the repository which contains commit comments given by the user. For second
I want to mirror a Github repo on my server using Web Hooks, or another real time mechanism. I don't want to use polling. Is there any existing software? If not, how would you do it? The server has gi
The deployment procedures in my company require that SQL scripts for creation of procedures and tables, etc. be bare. Generating create scripts in SQL Server Management Studio gives you significantly
Possible Duplicate: Rolling back local and remote git repository by 1 commit How can I remove the last commit from a remote GIT repository such as I don't see it any more in the log? If for example
I have installed GitStack on Windows Server 2008, and for a given project created a bare repository to which I push from my local development environment. I'd like to set up a hook that causes my stag
I'm trying to write a post-commit hook, I have a Git repository on a mapped drive (V:), msysgit installed in C:\Git, and Python in C:\Python26. I'm running TortoiseGit on Windows 7 64 Bit. The script
I have a RevCommit (api) object. I want to get the Repository (api) object from it. My main goal is to get the origin url. So I planned to get Repository -> getConfig() -> -> load() -> get
How could we write a commit-msg hook, for appending a string [XYZ] to all commits, except when the original commit message has [exclude-XYZ] in it somewhere? I am a beginner with shell scripting and h
I tried to make a new bare git repository but I get this error: Max:Git-Projekte max$ git clone --bare . ~/Dropbox/Git-Projekte/Mainpage.git Cloning into bare repository '/Users/max/Dropbox/Git-Projek
My commit is already push to Github, let say A > B > C > D > E -- HEAD I want to revert back to B , so I use git reset --hard <B:Hash> Now, it will look like A > B -- HEAD So, if
how may I checkout a bare repository on my server in a post-receive hook that includes submodules? I currently have this as a post-receive hook: #!/bin/bash # http://blog.ekynoxe.com/2011/10/22/git-po
I understood, that a bare repository is for sharing among different developers or machines. Is it possible to create a working copy from a bare repository, e.g. a new developer joins a project?
Our buildserver has a Mercurial repository. The build cycle starts every hour. Before the cycle starts, any old files have to be deleted: for example, all obj and bin directories created by the previo
How does one verify that files were pushed to a bare repository correctly? Since bare repositories have no working tree, you obviously can't do a simple git log because it isn't picked up as a git rep
Commit hooks in git live in the .git/hooks directory. What I would love is be able to commit those hooks so everyone checking out the repo has the hooks automatically. I'm not able to add the files in
What is the most efficient way to determine when the initial commit in a GitHub repository was made? Repositories have a created_at property, but for repositories that contain imported history the old
I need to do git revert HEAD~N Where N is a commit possibly 25-35 commits ago. How can I find what N is without reverting.
To revert a particular folder in SVN to its previous state I currently use the following: svn rm folder svn commit -m 'removed folder to revert to previous version' svn co http://pathto/repo/folder@26
What is the easiest way to use post-commit hook with VisualSVN Server to export from the repository to a directory for staging / testing after a developer commits his changes?
I am using post commit hook in visual svn. I am trying to checkout the files committed to the repository: When I commit the file, I get the below error in post commit hook: D:\Program Files\VisualSVN
I'm working on a repository I forked in which the author took the dirty path and stuffed all his dependencies in the lib/ directory in the initial commit. Normally, if it wasn't the initial commit, I
Suppose you have commit some changes, and then somehow deleted/modified some files by accident. Which would be better? Using revert oder update?
so I want to remove everything that I have worked on today, both from the git repo and also my local. i have a commit from yesterday, which I want to revert to. Could i remove the repo and then clone
Writing a Java application using SVNKit library I'm facing the following problem _1. Commit a client should commit his working copy who could be outdated After the commit, the repository must contain
So I have a single git repository with multiple branches, from this I have created a number of local repositories just selecting a single branch at a time, for example git clone --single-branch --bran