Search Results

Search found 5413 results on 217 pages for 'git pull'.

Page 40/217 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • git hooks - regenerate a file and add it to each commit ?

    - by egarcia
    I'd like to automatically generate a file and add it to a commit if it has changed. Is it possible, if so, what hooks should I use? Context: I'm programming a CSS library. It has several CSS files, and at the end I want to produce a compacted and minimized version. Right now my workflow is: Modify the css files x.css and y.css git add x.css y.css Execute minimize.sh which parses all the css files on my lib, minimizes them and produces a min.css file git add min.css git commit -m 'modified x and y doing foo and bar' I would like to have steps 3 and 4 done automatically via a git hook. Is that possible? I've never used git hooks before. After reading the man page, I think I need to use the @pre-commit@ hook. But can I invoke git add min.css, or will I break the internet?

    Read the article

  • Write directly to a remote Git repository, without adding objects to a local index/repo?

    - by Ryan B. Lynch
    Does Git support any commands that would allow me to commit directly from a local/working tree into a remote repository? The normal workflow requires a "git add", at least, to populate the object database with copies of the file contents, etc. I understand that this is NOT the normal, expected Git workflow. But I noticed that Git already supports downloading directly from the repository, with no local repo ("git archive"), so it seems reasonable that there might be a similar uploading operation. Alternatively, if there isn't such a command in the core Git itself, does any 3rd-party software support direct remote writes?

    Read the article

  • Git. Remote HEAD is ambiguous.

    - by Siegfried
    I checked the relevant thread but still can't solve this problem. When I typed "git remote show origin", I got * remote origin Fetch URL: xxxx Push URL: xxxx HEAD branch (remote HEAD is ambiguous, may be one of the following): development master Remote branches: development tracked master tracked Local branches configured for 'git pull': development merges with remote development master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) I also checked "git show-ref", and I got: 3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/development 3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/master 3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/development 3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/master Here is the list of all branches I have by executing "git branch -a" development * master remotes/origin/development remotes/origin/master And this is what is in the .git/config: [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true ignorecase = true hideDotFiles = dotGitOnly autocrlf = false [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = xxxx push = refs/heads/master:refs/heads/master [branch "master"] remote = origin merge = refs/heads/master [branch "development"] remote = origin merge = refs/heads/development I and it seems that the remote development and master branch share the same node. How to solve this ambiguity problem? Thank you!

    Read the article

  • How to configure git repository so a branch other than master is checked out after a cloning?

    - by Suraj Barkale
    I am trying to set up a git server with bunch of repositories. I am planning to use the branching model described in http://nvie.com/git-model article. So I will have at least two branches (named master and develop) in the repository. After a clone the master branch is checked out by git. Is there a git config option so that develop branch will be checked out instead? In effect I want git clone my_repo_url to behave as git clone -b develop my_repo_url.

    Read the article

  • How do I get Git's latest stable release version number?

    - by MattDiPasquale
    I'm writing a git-install.sh script: http://gist.github.com/419201 To get Git's latest stable release version number, I do: LSR_NUM=$(curl -silent http://git-scm.com/ | sed -n '/id="ver"/ s/.*v\([0-9].*\)<.*/\1/p') 2 Questions: Refactor my code: Is there a better way programmatically to do this? This works now, but it's brittle: if the web page at http://git-scm.com/ changes, the line above may stop working. PHP has a reliable URL for getting the latest release version: http://stackoverflow.com/questions/288206/is-there-a-site-which-simply-outputs-the-latest-stable-version-numbers-of-php-and Is there something like this for Git? This comes close: http://www.kernel.org/pub/software/scm/git/

    Read the article

  • Is there a way to "freeze" a file in Git?

    - by Suan
    I'm in a situation where I want to open source my project, however there's a single source file that I want to release a "clean" version of, but use a separate version locally. Does git have a feature where I can just commit a file once, and it stops looking for changes on that file from now on? I've tried adding the file to .gitignore, but after the first time when I do a git add -f and git commit on the file, and I proceed to edit it again, git status shows the file as changed. The ideal behavior would be for git to not show this file as changed from now on, even though I've edited it. I'd also be interested in how others have dealt with "scrubbing" their codebases of private code/data before pushing to an open source repo, especially on Git.

    Read the article

  • Why does schema.rb change (in the eyes of Git) when just running rake db:migrate?!

    - by erskingardner
    This is a little general I know, but it's been bugging the hell out of me. I've been working on lots of rails projects remotely with Git and every time I do a git pull and see that there is some sort of data change (migration, or schema.rb change) I do a rake db:migrate. These generally run fine and I can continue working. But if you do a git pull and then git status, your working directory is clean (obviously) then do a rake db:migrate (obviously when there are changes) and another git status and all the sudden your db/schema.rb has changed. I have been just doing a git checkout immediately to reset back to the latest committed version of the schema.rb file, but why should this be necessary?! What is rails doing? Updating a timestamp? I can't seem to figure out what the diff is but maybe I'm just missing something?

    Read the article

  • How to get rid of bogus changes in git?

    - by zaza
    I'm a happy user of PortableGit 1.7.0.2. Today I wanted to pull a project changes from GitHub.com repository, so I did git pull. It failed with the following message: error: Your local changes to 'main.rb' would be overwritten by merge. Aborting.. I didn't care about the local changes so I typed git reset --hard HEAD (git clean from here didn't help neither), but it didn't work. When asked for git status I was still able to see the file as modified. git diff showed me that each line of the file has been modified, while git diff -b showed no differences at all, so I guess this is a line ending issue. Which is strange because the code is only pushed from Windows machines. Anyway, the question is: how can I ignore the local, bogus changes and merge with the latest changes from the remote repository?

    Read the article

  • How can I use git to stage only one line in a file for commit, all from a script?

    - by Sandy
    I'm writing a simple pre-commit git hook that updates the year in copyright headers for files that are staged for commit. After modifying the line with the copyright, I would like the hook to stage that line so that it is part of the commit. It can't just git add the whole file, because there may be other pre-existing changes in there that shouldn't be staged. I don't see any options in the git add manual the let you stage specific lines. I figure I could git stash save --keep-index, apply my change, git add the file, and then git stash pop, but that seems rather crude. Any better approaches?

    Read the article

  • How to use git to download a particular tag?

    - by Jack BeNimble
    I'm trying to figure out how do download a particular tag of a git repository - it's one version behind the current version. I saw there was a tag for the previous version on the git web page, with object name of something long hex number. But the version name is "Tagged release 1.1.5" according the site. I tried a command like this (with names changed): git clone http://git.abc.net/git/abc.git my_abc And I did get something - a directory, a bunch of subdirectories, etc. If it's the whole repository, how do I get at the version I'm seeking? If not, how do I download that particular version?

    Read the article

  • Pulling in changes from a forked repo without a request on GitHub?

    - by Alec
    I'm new to the social coding community and don't know how to proceed properly in this situation: I've created a GitHub Repository a couple weeks ago. Someone forked the project and has made some small changes that have been on my to-do. I'm thrilled someone forked my project and took the time to add to it. I'd like to pull the changes into my own code, but have a couple of concerns. 1) I don't know how to pull in the changes via git from a forked repo. My understanding is that there is an easy way to merge the changes via a pull request, but it appears as though the forker has to issue that request? 2) Is it acceptable to pull in changes without a pull request? This relates to the first one. I'd put the code aside for a couple of weeks and come back to find that what I was going to work on next was done by someone else, and don't want to just copy their code without giving them credit in some way. Shouldn't there be a to pull the changes in even if they don't explicitly ask you to? What's the etiquette here I may be over thinking this, but thanks for your input in advance. I'm pretty new to the hacker community, but I want to do what I can to contribute!

    Read the article

  • What's the canonical process for backing up a website?

    - by Walkerneo
    This is going to sound terrible, but bear with me. I currently have a cron job that does a mysql dump, a git add all and commit, and a git push to bitbucket. I set this up almost a year ago, when I didn't know much about git, backups, and general web development and administration. I haven't had the time to fix this and do it properly, but the repo has now grown quite big from accumulating large temporary files from my forum, so now I have to do something and I want to do it properly this time around. What processes do semi-large websites and personal site admins use for backing up server content? Based on what I've learned since I set this up, what I'm currently think of doing is: Making changes on a development domain and committing the code frequently Archiving the entire site after a successful deployment from the development domain Having automatic daily database and user-content backups. I still like the idea of backing up sqldumps with git, though. I know git isn't a backup tool and that this is beyond its purpose, but the textual queries that are exported would be easily managed by git and would save a lot of space in archives.

    Read the article

  • TortoiseGit with non-default SSH port

    - by pek
    Hello, I have successfully setup gitosis on my server thanks to this helpful howto. Versions: Server: CentOS 5 Desktop: Windows 7 Git (on Desktop): 1.6.5.1.1367.gcd48 Client: TortoiseGit 1.3.2.0 (with msysgit 1.6.1) How can I clone a Git repository from my server when my SSH port is non the default (22)? I believe that the URL ssh://[email protected]:3031/gitosis-admin.git works, but I get: '/gitosis-admin.git' does not appear to be a git repository Thank you.

    Read the article

  • How to change the $PATH in Mac OSX

    - by Samuel Elgozi
    I've installed git via the instaler and not with terminal with commands, and my $PATH changed, the path to the 'local' git was added the the end of the variable, and my $PATH changed to this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin However, that doesnt help me, because i the path to Xcode's git comes first. so what I've done is the next, I added this lines to my '.bash_profile': export PATH="/usr/local/git/bin:$PATH" and now my path is the next: /usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin And I wanted to know how to remove the duplication from the end of the Path so I end up with: /usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin Thanks Ahead! And sorry if my english is too bad..

    Read the article

  • Gitosis on Mac OS X (Snow Leopard)

    - by Shyam
    Hi, I have a Snow Leopard box, where I have gitosis installed (Warning: noob alert), added a git user and I am able to remotely login to the machine with ssh. Locally, I can 'clone' my created repositories, as I can 'clone' the gitosis-admin too. Works perfect. I clone these using the 'git' user. git clone git@my-remote-machine:reponame.git remotely logged in, what doesn't work: git clone git@localhost:reponame.git However on that same remote machine where the repositories live, I can't clone from the localhost. It asks for a password, which wasn't created as far as I know. What am I doing wrong? Thank you for your replies!

    Read the article

  • GitLab post-receive hook not firing

    - by Ben Graham
    Apologies if this isn't the right stackexchange. I have a GitLab install. It was installed over the top of a gitolite install that was only a few days old, and I assume this non-standard setup is at the root of my problem, but I cannot pin it down. The problem is straightforward: post-receive hooks are not fired. This prevents 'project activity' appearing in GitLab. The problem looks like: $ git push #... error: cannot run hooks/post-receive: No such file or directory Hook Exists The post-receive hook/symlink exists and is executable: -rwxr-xr-x 1 git git 470 Oct 3 2012 .gitolite/hooks/common/post-receive lrwxrwxrwx 1 git git 45 Oct 3 2012 repositories/project.git/hooks/post-receive -> /home/git/.gitolite/hooks/common/post-receive It's Executable By GitLab The gitlab user can execute the script (I have removed the /dev/null redirect and fed in blank input to get an 'OK' as output): sudo su - gitlab -c /home/git/.gitolite/hooks/common/post-receive OK GitLab Can Find It GitLab is looking for hooks in the correct location: $ grep hooks /srv/gitlab/gitlab/config/gitlab.yml hooks_path: /home/git/.gitolite/hooks/ and $ bundle exec rake gitlab:app:status RAILS_ENV=production # ... /home/git/.gitolite/hooks/common/post-receive exists? ............YES Environment The env -i line in the hook is commonly cited as an issue. I think that would occur after this problem, but for completeness, redis-cli is found OK: $ env -i redis-cli redis> I've run out of debugging ideas on this one. Does anybody have any suggestions?

    Read the article

  • CodePlex now Supports Git

    - by The Official Microsoft IIS Site
    Great news for our CodePlex community: CodePlex now supports Git! Git has been one of the top rated requests from the CodePlex community for some time, and giving CodePlex users what they ask for and supporting their open source efforts has always been important to us. And the goodness continues, as the CodePlex team has a long list of improvements planned. So, why Git? CodePlex already has Mercurial for distributed version control and TFS (which also supports subversion clients) for centralized...(read more)

    Read the article

  • Git: Removing carriage returns from source-controlled files

    - by Blixt
    I've got a Git repository that has some files with DOS format (\r\n line endings). I would like to just run the files through dos2unix (which would change all files to UNIX format, with \n line endings), but how badly would this affect history, and is it recommended at all? I assume that the standard is to always use UNIX line endings for source-controlled files, and optionally switch to OS-specific line endings locally?

    Read the article

  • Trimming GIT Checkins

    - by yar
    I check my code into a GIT branch every few minutes or so, and the comments end up being things like "Everything broken starting again" and other absurdities. Then every few minutes/hours/days I do a serious checkin with a real comment like, "Fixed bug #22.55, 3rd time." How can I separate these two concepts? I would like to be able to remove all my frequent-checkins and just leave the serious ones.

    Read the article

  • Git and ssh authorizating

    - by Ockonal
    Hello, I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but at step: ssh [email protected] I get: Agent admitted failure to sign using the key. Permission denied (publickey). What's wroing? And, of course, I'm adding my own user email.

    Read the article

  • git difftool, open all diff files immediately, not in serial

    - by Seba Illingworth
    The default git diff behavior is to open each diff file in serial (wait for previous file to be closed before opening next file). I'm looking for a way to open all the files at once - in BeyondCompare for example this would open all the files in tabs within the same BC window. This would make it easier to review a complex set of changes; flick back and forwards between the diff files and ignore unimportant files.

    Read the article

  • Git ignore deleted files

    - by Petah
    Ok heres my situation. I have a website project that has more than 50,000 unimportant files (to development) in some directories. /website.com/files/1.txt /website.com/files/2.txt /website.com/files/3.txt /website.com/files/etc.txt The stuff in /files is already in the repo. I want to delete all the files in /files on my local copy but I want git to ignore it so it doesn't delete them when I do a pull on the web server. Any ideas?

    Read the article

  • Script to rebuild git history, applying code cleanup to every version

    - by rjmunro
    Has anyone got a script for git that can go through the history, check out each version, apply a cleanup script, then check the cleaned version into another repository? I have some code which I've been developing, but I haven't been consistent with code formatting e.g. tabs vs spaces etc. I'd like to rewrite my entire history to be consistent with the new standards.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >