What's the simplest way to undo the
git reset HEAD~
command?
Currently, the only way I can think of is doing a "git clone http://..." from a remote repo.
I have a local branch work, where I created two new files a.py, b.py and committed them.
Then, instead of doing "git rebase origin/master", I accidently typed "git rebase origin master", and now the commit I did is gone and the files are gone. Does anyone know how I can recover my files?
I'm trying to configure Git to use Plink, now for some reason this option isn't available to me
http://s3.amazonaws.com/Devlicious/CommunityServer.Blogs.Components.WeblogFiles/sergio_pereira/2009/05/msysgit-2.png?AWSAccessKeyId=0KMA35HT86EVXB99Z302&Expires=1275854459&Signature=D%2bkwVkPK93Zfw3h3tcH5ivOt3/0%3d
I tried uninstalling and reinstalling Git a hundred times I can't get to this option
I know of some people who use git pull --rebase by default and others who insist never to use it. I believe I understand the difference between merging and rebasing, but I'm trying to put this in the context of git pull. Is it just about not wanting to see lots of merge commit messages? Or are there other issues?
What is the difference between:
git commit -m "added a new page"
and
git commit -a -m "added a new page"
I know that the -a option will stage files that have been modified and deleted, but then what does running it without the -a mean?
Thanks for reading.
I using svn. I have two branches and on both of them were performed a lot of changes.
In addition of one of the branches a lot of files were renamed, so now svn can not help me merge changes in those files (well know svn limitation).
Is it possible using git-svn to perform the merge of the branches?
Will git-svn hanndle renamed files too?
Thanks
Hi there,
I was intending to have a play with git, and was wondering if anyone had used the git plugin for eclipse
I see it's at version 0.3.1, and was wondering if anyone knew how stable it was / any gotchas?
Thanks...
I'm a bit new to git, and I fail to understand why git commit -a only stages changed and deleted files but not new files.
Can anyone explain why is it like this, and why there is no other commit flag to enable adding files and committing in one command?
BTW, hg commit -A adds both new and deleted files to the commit
Hi, is there a way to get only a part (ex: a sub-folder called /library) of a github.com project and use it in svn:externals?
What I'm doing now is
$svn pe svn:externals .
SomeLibrary http://svn.github.com/myuser/myproject.git
But I don't want everything from the project... I need something like:
$svn pe svn:externals .
SomeLibrary http://svn.github.com/myuser/myproject.git/library
Is it possible to exclude specific files (*.ai, *.psd) when pushing to certain repositories with GIT?
My need comes from trying to use GIT for both version control and deployment to Heroku. If I include my graphic assets in the deploy, they slug size is larger than desired. However, I do need to include all project files in my main github repository.
Thanks,
Kevin
Hi,
I understand how to create aliases in PowerShell for cmdlets fine but I want to create an alias in PowerShell for things like "git status" as just "gs" and "git pull origin master" as "gpm" can anyone point me in the right direction?
I am sure I am missing something obvious.
Many thanks
Richard
I use Subversion via TortoiseSVN but I hear good things about Git.
Are there any similar tools available for Git on Windows?
Feel free to answer with tools which still in early development.
What command can I use to print out the commit id of HEAD?
This is what I'm doing by hand:
$ cat .git/HEAD
ref: refs/heads/v3.3
$ cat .git/refs/heads/v3.3
6050732e725c68b83c35c873ff8808dff1c406e1
But I need a script that can reliably pipe the output of some command to a text file such that the text file contains exactly the commit id of HEAD (nothing more or less, and not just a ref). Can anyone help?
Does Git only use the remote name origin for a repository which was created by cloning?
eg, say I create a repository, place it on a remote, and try to clone it again into the same directory, which one would Git name origin?
Is it possible to exclude specific files (*.ai, *.psd) when pushing to certain repositories with Git?
My need comes from trying to use Git for both version control and deployment to Heroku. If I include my graphic assets in the deploy, the slug size is larger than desired. However, I do need to include all project files in my main github repository.
Thanks,
Kevin
I created an Android project, added it to my git repo, comitted and pushed my clone to the master. Later I tried checking out the project and Eclipse complained about missing src folders. I checked my repo and the master repo and the src folders are missing (Im sure they were there when I created the project). So can someone explain what happened here? Im new to git so maybe I missed something?
Git is implemented as a directed acyclic graph. Children know their parents but not the other way round. This makes sense because i can reach every commit only through a branch or a tag ( generally speaking through a reference). That's how i traverse the tree. What other reasons had the developers of Git to make "the children know their parents but not the other way around"?/ What are the key benefits of this?
I've been using Git for a bit now (hosting my own) and would love to have something like GitHub that I could setup for my own repos. I've seen GitWeb, but I just don't like using it all that much. Is there anything for Git that's as slick as Warehouse for SVN?
Just out of curiosity I want to see the total amounts of insertions, deletions and other modifications on my GIT repository since it was first created.
Similar to git log --stat but for all commits.
Anyone know how to do this?
Since I created my repository it appears that the tags I have been
creating are not pushed to the repository. When I do git tag on the
local directory all the tags are present, but when I logon to the
remote repository and do a git tag, only the first few show up.
What could the problem be?
Git treats lines starting with # as comment lines when committing. this is very annoying when working with a ticket tracking system, and trying to write the ticket number at the beginning of the line, e.g.
#123 salt hashed passwords
git will simply remove the line from the commit message. is there any way to escape the hash? i tried \ and !, but nothing works. whitespaces before # are preserved, so they aren't a working solution to the problem either.
How can I differentiate between two
local branches in git ?
How can I copy one local branch to another local branch ?
In general how can I perform difference operation between two local branches on my server using git. I tried looking it up online but there is not enough documentation on that or there is not clear documentation on that.
Any suggestions or links to useful material would be highly appreciated.
Thanks.
I have a git bare repo that I manage and I want to have git auto create tracking branches for all the remote branches. That way no one has to auto create them.
I tried to do it in a post fetch hook, but couldn't get it working.
i want to see the number of removed/added line, grouped by author for a given branch in git history. there is git shortlog -s which shows me the number of commits per author. is there anything similar to get an overall diffstat?
Hi,
Currently I have an website on a .zip file containing also the .git directory and all the history. I want it to be imported into an Assembla git repository preserving the history of all previous changes. Is there an easy way of doing it?