Search Results

Search found 3789 results on 152 pages for 'git diff'.

Page 7/152 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Git. Checkout feature branch between merge commits

    - by mageslayer
    Hi all It's kind weird, but I can't fulfill a pretty common operation with git. Basically what I want is to checkout a feature branch, not using it's head but using SHA id. This SHA points between merges from master branch. The problem is that all I get is just master branch without a commits from feature branch. Currently I'm trying to fix a regression introduced earlier in master branch. Just to be more descriptive, I crafted a small bash script to recreate a problem repository: #!/bin/bash rm -rf ./.git git init echo "test1" > test1.txt git add test1.txt git commit -m "test1" -a git checkout -b patches master echo "test2" > test2.txt git add test2.txt git commit -m "test2" -a git checkout master echo "test3" > test3.txt git add test3.txt git commit -m "test3" -a echo "test4" > test4.txt git add test4.txt git commit -m "test4" -a echo "test5" > test5.txt git add test5.txt git commit -m "test5" -a git checkout patches git merge master #Now how to get a branch having all commits from patches + test3.txt + test4.txt - test5.txt ??? Basically all I want is just to checkout branch "patches" with files 1-4, but not including test5.txt. Doing: git checkout [sha_where_test4.txt_entered] ... just gives a branch with test1,test3,test4, but excluding test2.txt Thanks.

    Read the article

  • Master does not appear to be a git repository error

    - by EmmyS
    I've inherited a position and instructions for creating a new git repository. Unfortunately I've run into problems and no one here knows what to do. Hoping someone can help me out. Here are the instructions I was left: Create a new repository: For these steps you need to be in the gitosis-admin repository, if you don't have it, in a suitable parent folder do: git clone [email protected]:gitosis-admin.git Edit gitosis.conf file - in gitosis-admin root, under [group base-repo] section, add the name of the new repo to the end of the "writable =" section. Commit change and push back to gitosis-admin master. For the next commands, my_new_project represents the name of your project mkdir my_new_project cd my_new_project git init Copy in any files you want to use to start the repo git commit -a -m "Initializing new repository" git remote add origin [email protected]:my_new_project.git git push master git push master:qa So I did 1 and 2, with no problem. It created a local folder on my machine called gitosis-admin. I edited the gitosis.conf file as indicated. But when I try to do step 3 (which I assume is git push gitosis-admin master) bash tells me that fatal: 'master' does not appear to be a git repository fatal: The remote end hung up unexpectedly What am I doing wrong?

    Read the article

  • Cron job checking for changes in Git repository

    - by HNygard
    We have just moved our server configs to a Git repository. Therefore there should not be any changes in any of the repository folders. I was thinking about how I could set up a cron job to check for any uncommited changes. How could a cron job be set up to check for changes in a Git repository? Greping the output of the git status command might just do it. Grep and cron jobs are not my strong side. Here are some sample outputs from git status: Standing the folder containing the git repository (e.g. /path/gitrepo/) with changed files: $ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: apache2/sites-enabled/000-default # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # apache2/conf.d/test no changes added to commit (use "git add" and/or "git commit -a") Standing in the folder when there is no changes: $ git status # On branch master nothing to commit (working directory clean) Update: Synced up with origin is not important. There should be no local changes. Local files that must be in place go into the .gitignore file. In addition to the server configs there are also git repos for content (static web sites, web apps, wordpress, etc). None of the repositories should have local changes. We might use Puppet in the long run since its being used for development of one of the web apps.

    Read the article

  • In git, how can I get the diff between two dates?

    - by Weidenrinde
    Basically, I am looking for something equivalent to cvs diff -D"1 day ago" -D"2010-02-29 11:11". While collecting more and more information, I found a solution. I paste it here, for others that might have similar problems. Things I have tried: In git, how can I get the diff between all the commits that occured between two dates? was ansered here with: git whatchanged --since="1 day ago" -p But this gives a diff for each commit, even if there are multiple commits in one file. I know that "date" is a bit of a loose concept in git, I thought there must be some way to do this. git diff 'master@{1 day ago}..master gives some warning warning: Log for 'master' only goes back to Tue, 16 Mar 2010 14:17:32 +0100. and does not show old diffs. git format-patch --since=yesterday --stdout does not give anything. revs=$(git log --pretty="format:%H" --since="1 day ago");git diff $(echo "$revs"|tail -n1) $(echo "$revs"|head -n1) works somehow, but seems complicated and does not restrict to the current branch. git diff $(git rev-list -n1 --before="1 day ago" master) seems to work and a default way to do similar things, although more complicated than I thought. Funnily, git-cvsserver does not support "cvs diff -D" (without that it is documented somewhere).

    Read the article

  • How can I view multiple git diffs side by side in vim

    - by Pete Hodgson
    I'd like to be able to run a command that opens up a git diff in vim, with a tab for each file in the diff set. So if for example I've changed files foo.txt and bar.txt in my working tree and I ran the command I would see vim open with two tabs. The first tab would contain a side-by-side diff between foo.txt in my working tree and foo.txt in the repository, and the second tab would contain a side-by-side diff for bar.txt. Anyone got any ideas?

    Read the article

  • How to configure Hudson and git plugin with an SSH key

    - by jlpp
    I've got Hudson (continuous integration system) with the git plugin running on a Tomcat Windows Service. msysgit is installed and the msysgit bin dir is in the path. PuTTY/Pageant/plink are installed and msysgit is configured to use them. When I run a job that attempts to clone the git repository I get the following error: $ git clone -o origin git@hostname:project.git "e:\HUDSON_HOME\jobs\Project Trunk\workspace" ERROR: Error cloning remote repo 'origin' : Could not clone git@hostname:project.git ERROR: Cause: Error performing git clone -o origin git@hostname:project.git e:\HUDSON_HOME\jobs\Project Trunk\workspace Trying next repository ERROR: Could not clone from a repository FATAL: Could not clone hudson.plugins.git.GitException: Could not clone Running git clone -o origin git@hostname:project.git "e:\HUDSON_HOME\jobs\Project Trunk\workspace" from the command line works without error. I've confirmed that my issue is not the same as http://stackoverflow.com/questions/1177292/hudson-git-clone-error because git is in the path and I don't get any error about the git executable on Hudson's Configure System page. This leads me to believe that the problem is that the user who owns the Tomcat/Hudson Windows service (Local System) has no SSH key set up to be able to clone the git repository. My question is, how can I set things up so that the git plugin/msysgit know to use a particular SSH key when trying to clone? I don't think Pageant will work because the Tomcat service is running as the "Local System" user, but I may be wrong. I have tried setting Pageant up as a service (using runassvc.exe), passing the appropriate key, and having it run as "Local System". The Tomcat/Hudson service doesn't seem to be able to see the key from the pageant service. Are there any other techniques for setting up a key? Thanks. EDIT: The discussion on http://n4.nabble.com/Hudson-with-git-and-ssh-td375633.html shows that someone else had a similar question. ssh-agent was suggested and this tool does come with msysgit but I'm not sure how to use it in conjunction with the Hudson service. Still, good clue if anyone can fill in the gaps. Thanks to Peter for the comment with the link. Also, the discussion on http://n4.nabble.com/questions-about-git-and-github-plug-ins-td383420.html starts off with the same question. I'm trying to resurrect that thread.

    Read the article

  • Using 'git pull' vs 'git checkout -f' for website deployment

    - by Michelle
    I've found two common approaches to automatically deploying website updates using a bare remote repo. The first requires that the repo is cloned into the document root of the webserver and in the post-update hook a git pull is used. cd /srv/www/siteA/ || exit unset GIT_DIR git pull hub master The second approach adds a 'detached work tree' to the bare repository. The post-receive hook uses git checkout -f to replicate the repository's HEAD into the work directory which is the webservers document root i.e. GIT_WORK_TREE=/srv/www/siteA/ git checkout -f The first approach has the advantage that changes made in the websites working directory can be committed and pushed back to the bare repo (however files should not be updated on the live server). The second approach has the advantage that the git directory is not within the document root but this is easily solved using htaccess. Is one method objectively better than the other in terms of best practice? What other advantages and disadvantages am I missing?

    Read the article

  • install git on RHEL3

    - by Dan Littlejohn
    having a problem installing git on redhat enterprise 3. When I try and install the rpm it gives a circular dependency problem. [root@tflaus001 tmp]# rpm -i git-1.5.2.1-1.el3.rf.i386.rpm warning: git-1.5.2.1-1.el3.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6 error: Failed dependencies: perl(Git) is needed by git-1.5.2.1-1.el3.rf [root@tflaus001 tmp]# rpm -i perl-Git-1.5.2.1-1.el3.rf.i386.rpm warning: perl-Git-1.5.2.1-1.el3.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6 error: Failed dependencies: git = 1.5.2.1-1.el3.rf is needed by perl-Git-1.5.2.1-1.el3.rf perl(Error) is needed by perl-Git-1.5.2.1-1.el3.rf can anyone give me an idea of how to fix this or what I need to add to yum.conf to fix this?

    Read the article

  • Git Daemon on linux?

    - by bwawok
    Trying to set up a simple git-daemon on a linux server, and talk to it from a windows box. On linux server: Make a folder /home/foo/bar CD to /home/foo/bar do a git --bare init here Do a touch git-daemon-export-ok CD to /home/foo Run the command git-daemon --verbose --reuseaddr --base-path=/home/foo --enable=receive-pack On Windows Client w tortoise Git Do git.exe clone --progress -v "git://servername/bar" "C:\source\myFolderName" (works) Create file a.txt, add it to git, and commit (works) Do a git.exe pull "origin" master and then get fatal: Couldn't find remote ref master (makes sense, master isn't there yet) Do a git.exe push "origin" master:master and tortoise hangs forever without do anything I realize why I can't pull from master yet on the remote branch.. but why can't I push my first commit into the remote repo? #4 really should work. Tried it both with tortoise and the mysysgit command line, both cases I hang forever. What am I missing? Server has no useful log

    Read the article

  • How to keep groups when pulling with git

    - by mimrock
    I have a staging site that is a working directory of a git repository. How to set up git to let a developer pull out a branch or release without changing the group of the modified files? An example. Let's say I have two developers, robin and david. They are both in git-users group, so initially they can both have write permissions on site.php. -rw-rw-r-- 1 robin git-users 46068 Nov 16 12:12 site.php drwxrwxr-x 8 robin git-users 4096 Nov 16 14:11 .git After robin-server1$ git pull origin master: -rw-rw-r-- 1 robin robin 46068 Nov 16 12:35 site.php drwxrwxr-x 8 robin git-users 4096 Nov 16 14:11 .git And david do not have write permissions on site.php, because the group changed from 'git-users' to 'robin'. From now on, david will get a permission denied, when he tries to pull to this repository.

    Read the article

  • git-receive-pack : command not found.

    - by Philippe Mongeau
    I made a git repo on a local machine with "git init --bare" and added it as the remote origin on the project on my main computer with ssh: git add remote origin [email protected]:repoName.git I was able to make a commit and push from my main computer to the other computer the day I created the repo, but today i tried and it didn't work. When I did "git push origin" it returned this error: bash: line 1: git-receive-pack: command not found fatal: The remote end hung up unexpectedly The two machines are mac the main one running Leopard and the server one running Tiger. I think it may be realted to the $PATH of git on the server but I'm not sure. i used theses instrution to create my git server: http://blog.commonthread.com/2008/4/14/setting-up-a-git-server

    Read the article

  • Git Repo to mantain the app configurations in several servers

    - by user62904
    Hi! I need to versioning in a GIT repository, configurations of a particular platform, spread across multiple servers. Take into account that in each of these servers there are completely different configurations, while the application is the same. What is the best way to do this? Create a branch for each server repository.git:conf -- [branch Server 1] repository.git:conf -- [branch Server 2] repository.git:conf -- [branch Server N] Note: This method seems to me, that is difficult to maintain because each change in the server configurations, I need to create subbranches which becomes confusing. Create a single repo with a different directory for each server repository.git:conf/Server 1 repository.git:conf/Server 2 repository.git:conf/Server N Note: This is easy to mantain Create a repo for each server repository_1.git:conf repository_2.git:conf repository_N.git:conf Note: This method requires me to create a branch for each new server. There are other methods, what are the best practices in this case? Should I use the one that I feel most comfortable? Tks, Gulden PT

    Read the article

  • How to find if a branch is a locally tracked branch or user created local branch?

    - by Senthil A Kumar
    I have a remote tracking branch tracked locally in my local repository using 'git branch -b branch-name origin/branch-name'. My remote branch is test2/test2 (origin/branch-name) which is being tracked locally as test2. The origin is also named test2. I haven't checked-out my local tracking branch test2. When i do a 'git pull origin remote-branch:local-tracked-branch' i get this error [test2]$ git pull test2 test2:test2 From /gitvobs/git_bare/test2 ! [rejected] test2 - test2 (non fast forward) Whereas when i checkout my local tracking branch test2 and do pull 'git pull origin local-tracked-branch' i don't get the error and i do a pull using 'git pull test2 test2' From /gitvobs/git_bare/test2 * branch test2 - FETCH_HEAD Auto-merging a.txt Automatic merge failed; fix conflicts and then commit the result. i know that adding a + (git pull test2 +test2:test2) would help but it overwrites local changes. So how do i know which of my local branches are created by me locally using 'git branch new-branch-name' or tracked locally from remote branches using git branch -b branch-name origin/branch-name'?

    Read the article

  • Git-svn refuses to create branch on svn repository error: "not in the same repository"

    - by Danny
    I am attempting to create a svn branch using git-svn. The repository was created with --stdlayout. Unfortunately it generates an error stating the "Source and dest appear not to be in the same repository". The error appears to be the result of it not including the username in the source url. $ git svn branch foo-as-bar -m "Attempt to make Foo into Bar." Copying svn+ssh://my.foo.company/r/sandbox/foo/trunk at r1173 to svn+ssh://[email protected]/r/sandbox/foo/branches/foo-as-bar... Trying to use an unsupported feature: Source and dest appear not to be in the same repository (src: 'svn+ssh://my.foo.company/r/sandbox/foo/trunk'; dst: 'svn+ssh://[email protected]/r/sandbox/foo/branches/foo-as-bar') at /home/me/.install/git/libexec/git-core/git-svn line 610 I intially thought this was simply a configuration issue, examination of .git/config doesn't suggest anything incorrect. [svn-remote "svn"] url = svn+ssh://[email protected]/r fetch = sandbox/foo/trunk:refs/remotes/trunk branches = sandbox/foo/branches/*:refs/remotes/* tags = sandbox/foo/tags/*:refs/remotes/tags/* I am using git version 1.6.3.3. Can anyone shed any light on why this might be occuring, and how best to address it?

    Read the article

  • GIT clone repo across local file system

    - by Jon
    Hi all, I am a complete Noob when it comes to GIT. I have been just taking my first steps over the last few days. I setup a repo on my laptop, pulled down the Trunk from an SVN project (had some issues with branches, not got them working), but all seems ok there. I now want to be able to pull or push from the laptop to my main desktop. The reason being the laptop is handy on the train as I spend 2 hours a day travelling and can get some good work done. But my main machine at home is great for development. So I want to be able to push / pull from the laptop to the main computer when I get home. I thought the most simple way of doing this would be to just have the code folder shared out across the LAN and do: git clone file://192.168.10.51/code unfortunately this doesn't seem to be working for me: so I open a git bash cmd and type the above command, I am in C:\code (the shared folder for both machines) this is what I get back: Initialized empty Git repository in C:/code/code/.git/ fatal: 'C:/Program Files (x86)/Git/code' does not appear to be a git repository fatal: The remote end hung up unexpectedly How can I share the repository between the two machines in the most simple of ways. There will be other locations that will be official storage points and places where the other devs and CI server etc will pull from, this is just so that I can work on the same repo across two machines. Thanks

    Read the article

  • Would this be the equivalent of creating a branch, while working with a detached head in Git?

    - by Geo
    Let's say I checked out a version different than HEAD. Let's say I made some commits, and so an anonymous branch was created. Afterwards I may have checked out a different branch, so now the only way to get to my commits is via reflog. If do this: >> git reflog | grep -i mycommit sha1hash >> git branch reattaching >> git cherry-pick hash_of_commits >> git checkout master >> git merge reattaching Is it the equivalent of: >> git reflog | grep -i mycommit sha1hash >> git branch reattaching sha1hash >> git checkout master >> git merge reattaching What happens to the detached head commits, as I think that via cherry-picking, they will exist in 2 places. Will they forever remain in my repository?

    Read the article

  • How to migrate from SVN to GIT Locally

    - by Guilherme
    I'm working on a project that initially used Subversion, but the remote repository was removed and i don't want to use Subversion any more. I want to migrate it to git. There's a way to do it without the remote repository, keeping all revisions history (without doing a git init .)? I've already made a subversion to git migration with git-svn with no problems it on other projects, but they were on remote repository and i cannot find any info about migrating it locally.

    Read the article

  • Git append the current commit hash to result of a commit command

    - by farzan
    I want to append the hash of the ongoing commit to its result. I can retrieve the hash using this command: git log --format=%H | tail -1 Then I try to merge a commit with command above and make an alias in '.gitconfig', like this: [alias] ci = !git commit && git log --format=%H | tail -1 But this does not work; parameters of alias are send to tail command, not git commit. How should I create this alias?

    Read the article

  • git push not updating the cloned from repo

    - by dhaval
    I did the following git clone from another repo say Release1 made changes to cloned repo committed changes pushed changes to both master and Release1 pulled changes from cloned folder in Release1 status/log is showing my changes at both places The update is not reflected at Release1 What did I miss in the above steps? Both repo are in same server.

    Read the article

  • Using git-svn with existing svn project

    - by rogeriopvl
    I'm currently working on a project that has a svn repository. I'm used to git and love the way it allows me to have a local repository, so I would like to use git-svn with this project. I would like to know how to use git-svn from a svn project already in my computer. Do I really need to make a clone and start from there? Or can I just do something like git svn init in the current project folder and proceed from there? Also I would like to know about any big issues using git-svn, since this is a serious project and I shouldn't mess around with the repo. Thanks in advance.

    Read the article

  • git-svn branching

    - by slayerIQ
    Hello, I am using git with an svn repository everything is going fine I did all my branching with git so I did not branch on svn but I branched with git and pushed those branches to a separate location. Then I commited changed from the branch when needed. But now I want to create some branches that actually exist on svn I tried: $ git svn branch someFeature -m "message" ,and I got this: $ git svn branch someFeature -m "message" Multiple branch paths defined for Subversion repository. You must specify where you want to create the branch with the --destination argument. How should I specify the destination I cant figure this out and the man page isn't that clear also.

    Read the article

  • View a git diff-tree in a reasonable format

    - by Josh
    Howdy, I'm about to do a git svn dcommit to our svn repo -- and as is recommended in a number of places, I wanted to figure out exactly what I was going to be committing with a dry run. As such I ran: git svn dcommit -n This produced output: Committing to http://somerepo/svn/branches/somebranch diff-tree 1b937dacb302908602caedf1798171fb1b7afc81~1 1b937dacb302908602caedf1798171fb1b7afc81 How do I view this in a format that I can consume as a human? A list of modified files comes to mind. This is probably easy, but running git diff-tree on those hashes gives me a reference to a directory and a some other hashes, as well as some numbers. Not quite sure what to make of it. Thanks very much, Josh

    Read the article

  • Convert SVN Subdirectory to Git

    - by magneticMonster
    I would like to ditch SVN for Git. My current SVN repository setup has projects under trunk (/trunk/projecta, /trunk/projectb, etc. with tags and branches at /tags/projecta-1.0, etc.). I would like to create distinct Git repos for each of these projects by pulling them out of SVN using git-svn. I've successfully pulled the entire SVN repo down to a local Git repo but all of the projects exist in the same Git repo now. Is it possible to pull them apart at this point?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >