Hey guys, just now I committed and pushed something (yes, my mistake on the push) that I decided I should 'revert' or 'undo'. So I was told to issue git reset --soft HEAD^ on my end, and I figured this would somehow create a 'revert' commit that once committed would make it as if the change never happened. I don't mind if the history of ...
I use Windows, Mac OS X and linux on a daily basis. I use git in all these environments, pulling from repos that are used by folks with different choices for line endings.
Are there definitive recommendation for setting core.autocrlf in my situation?
...
I have a project hosted on GitHub and I would like to work locally on it. I have multiple Computers that need to access it and I would like to share code between them. However, I do not want all of these commits to go on GitHub, so a simple "clone and then just push/pull" approach does not suit.
Essentially, I want this:
[GitHub] --> [...
How can I view any local commits I've made, that haven't yet been pushed to the remote repository? Occasionally, git status will print out that my branch is X commits ahead of origin/master, but not always. Is this a bug with my install of Git, or am I missing something?
...
Long story short*, I did some things with my git repository that I don't know how to do, and ended up detaching my head, that is, when I commit master isn't up to date.
How can I fix this? Do I have to merge? (If so, what are the exact commands I want to run?)
When I run git branch, it tells me I'm currently on no branch
$ git branch...
Same issue when I try to open vi. bash is the shell I'm using. vi, or git commit, fails miserably saying "Unrecognized TERM Type".
I did some googling. They all suggests setting the TERM type manually like
export TERM=vt100
Tried and failed. stackoverflow is going to be my last hope. or maybe I should let go of cygwin/git and try s...
Is there a way in which I can see all the git repositories that exist on my machine? Any command for that?
...
My version number looks like 0.1.3 and has two components:
0.1 (the tag)
3 (commits after tag)
All this information easy to obtain from git describe --tags.
For version 0.1.3 git describe may look like
0.1-3-g53d4dec
All of this works fine, but I'm looking for the number of commits affecting only a given subtree, not the whole r...
When I have a repository with both lightweight and annotated tags, git-for-each-ref only seems to sort one of the sets. I would like to modify my call to for-each-ref to get output which sorts all the tags and intermixes them in the output. For example:
bash-3.2$ git tag | xargs -I T git log -n 1 --format='%at T' T | sort -rn | awk '...
I'm trying to setup a git hook that will disallow anyone to delete the master, alpha, and beta branches of our repository. Can anyone help with this? I have never done a git hook so i don't want to try my luck in developing my own without a little help.
Thanks in advance.
...
I have two versions of one project in one local git repository. I have to commit this repository into 2 remote repositories, one for each version;
LOCAL GIT(V1/V2) -> REMOTE GIT(V1), REMOTE GIT(V2)
I have some files in the LOCAL GIT repository which should only go to REMOTE GIT(V1) and other should only go to REMOTE GIT(V2). Now I comm...
Here's the situation. I'm working on the master branch. I create file1 and commit. I create file2 and commit. Whoops. I may want to use file2, someday, but it's definitely not something that should be put in the master branch. So that I don't lose file2 I use
git checkout head~1
git branch new-branch
git checkout new-branch
so that I...
In SVN you can checkout a portion of a repository ie:
http://some-url.com/repo/app1/trunk/plugins/plugin1
Can you do the same when you git clone? As I cannot get this to work
Thanks
...
I have just recently converted an old company svn repo which has a bunch of projects into a git repo
ie.
repo
project-1
project-2
project..n
From within this new git repo how would you recommend creating a submodule for each individual project?
...
How would you setup an code repository where you have a proprietary version and an open source version, say like Chrome and Chromium?
With Git, would you use two branches or two repositories?
How would you keep the "private" version up to date with the open source one?
...
I am trying to use git as a frontend to a svn repository in order to be able to use git's nice features like simple branching, stashing etc.
The problem is that the SVN repository is quite large (8,000 revs) and contains lots of branches and tags (old as well as new).
It's a near standard layout, with a config containing fetch, branche...
So I was working in a branch and decided to remove my docs directory from the repo using git rm -r --cached docs. This all went well. Committed, working directory clean, all good. Now when I try to git checkout master so that I can merge this branch back into master I get the following error:
error: Untracked working tree file 'docs/bin...
When using a custom driver for merging in Git what is the full file path of the Git attributes /arguments you pass to the driver?
Ex:
driver = filfre %O %A %B
What is the full file path of the three files, %O, %A, and %B?
-Tanner
...
"Cannot rewrite branch(es) with a dirty working directory".
I am new to Git - I tried googling for an answer to no avail.
What does this error mean? What should/can I do?
...
I'm new to Git and a bit confused. I have Master branch and have created a second feature branch.
If I make changes in my feature branch and then switch to Master, will my changes be lost if I don't commit?
Where does stash come into play, is it something you do before you switch branches (but don't want to commit) or is it to sim...