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?
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.
I work on a git repository where we build an php community but i need to show it somewhere so I am looking for a way to automatic upload my files to a remote http server when i push to the repository.
Thanks /Victor
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.
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.
I've got vim setup as my external diff tool:
[diff]
external = git_diff_wrapper
!/bin/sh
vimdiff "$2" "$5"
Say I have 300 files that have been modified; via bash, I type "git diff". It launches 300 vimdiffs sequentially, how do I abort it?
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.
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?
I have two branches master and exp
i tried to cherry pick some of the commit in the exp to master.I am getting
the following error.
git cherry-pick 209c4b154d3c15fa8086d4cc15fa34e53b8a65a3
fatal: Dirty index: cannot cherry pick
Can anyone explain this error.
I'm a Ruby on Rails developer and want to use Git for my next project, but I'm not pretty sure how to begin learning this.
I have too much basic questions like "Can I run my app from the repository?", or "Can I make a rollback in the live site?"
Any help will be apreciated.
Hi,
I have followed the following instructions in setting a git repository locally in one of my hard drive (1):
https://trac.webkit.org/wiki/UsingGitWithWebKit
I would like to know if it is possible for me to set up another repository in a different hard drive which mirrors the one I setup in (1)? By mirrors, I mean if I commit some changes the other repository can retrieve it.
Thank you.
I'm coming to an existing project in which people used git to track everything from scratch. I want to have a tool to view the differences between several commits. gitk does a good job, but talking about human readability, it's does not facilitate me much.
Is there a better solution? I'm looking for a set of tools that allow me to easily compare branches (some how like winmerge - Display two version in parallel and highlight the changes), and running on Mac.
Title says it. What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "output" in separate panels.
Also, instructions for invoking said tool would be great. (I still haven't figure out how to start kdiff3 in such a way that it doesn't give me an error)
edit: My OS is Ubuntu.
hello, I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does.
make some changes, commit and push back again.
It's possible?
I am starting a new distributed project where some of the developers will not be in the same country... What should I use: Git or SVN?
Why?
PS. It is a smart client application running on windows and will be developed using Visual Studio
[UPDATE] And does it work on MacOS (Not required but interesting to know)?
When you use
git rm --cached myfile
it doesn't delete from the local filesystem, which is my goal. But once you commit the changes, push them to a central repository, then pull them into another yet another repository it still deletes the file from that system.
Is there a way to just remove the file from the index without deleting it from any filesystem?
I've a master branch with a .gitignore file with directory X listed in it. (X is not being tracked).
When I try to add a branch tracking a remote using the command
git checkout -b mybranch origin/mybranch
The remote branch is tracking X directory, and hence this checkout fails with the error
Untracked working tree file 'X' would be overwritten by merge.
what is the way out ?
Surya
how do we do like changing version ( each +1 ) using git on each push?
example i have a 2 php file
libs/lib1.php
libs/lib2.php
on each header usually there is some information like
/**
* LIB1.PHP
* this libs does something like this
* and that this is a doc for you
* @version 145
* @todo something todo
* @author DAMS
*/
/**
* LIB2.PHP
* this libs does something like this
* and that this is a doc for you
* @version 445
* @todo something todo
* @author DAMS
*/
can we search and add +1 do version every time we push?
I'm using eclipse 3.5.2 and cannot seem to use "filter resources" to filter out .git folders in any of my projects for any of my perspectives: javascript, ruby, and php. I've tried adding the filter to plugin.xml as suggested on this blog but it is for eclipse 3.4 and doesn't seem to work. Any suggestions?
I am running a PHP - MySQL website, and have set up a remote repository on my own server using Git.
I now want a way to be able to have a production and a test server, and some how be able to push my changes from dev to production easily. and seamlessly.