Created
March 7, 2011 05:53
-
-
Save nylen/858131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
james@debbay:~/.vim$ git --version | |
git version 1.7.4.1 | |
james@debbay:~/.vim$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 2 commits. | |
# | |
nothing to commit (working directory clean) | |
james@debbay:~/.vim$ mkdir bundle; cd bundle | |
james@debbay:~/.vim/bundle$ git clone git://github.com/tpope/vim-abolish.git | |
Cloning into vim-abolish... | |
remote: Counting objects: 37, done. | |
remote: Compressing objects: 100% (17/17), done. | |
remote: Total 37 (delta 8), reused 37 (delta 8) | |
Receiving objects: 100% (37/37), 12.28 KiB, done. | |
Resolving deltas: 100% (8/8), done. | |
james@debbay:~/.vim/bundle$ cd .. | |
james@debbay:~/.vim$ git add bundle | |
james@debbay:~/.vim$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 2 commits. | |
# | |
# Changes to be committed: | |
# (use "git reset HEAD <file>..." to unstage) | |
# | |
# new file: bundle/vim-abolish | |
# | |
james@debbay:~/.vim$ git commit -m "Add tpope's abolish" | |
[master 30c96e3] Add tpope's abolish | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 160000 bundle/vim-abolish | |
james@debbay:~/.vim/bundle$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 3 commits. | |
# | |
nothing to commit (working directory clean) | |
james@debbay:~/.vim/bundle$ touch vim-abolish/test | |
james@debbay:~/.vim/bundle$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 3 commits. | |
# | |
# 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) | |
# (commit or discard the untracked or modified content in submodules) | |
# | |
# modified: vim-abolish (untracked content) | |
# | |
no changes added to commit (use "git add" and/or "git commit -a") | |
james@debbay:~/.vim/bundle$ rm vim-abolish/test | |
james@debbay:~/.vim/bundle$ cd vim-abolish/ | |
james@debbay:~/.vim/bundle/vim-abolish$ git checkout HEAD^ | |
Note: checking out 'HEAD^'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -b with the checkout command again. Example: | |
git checkout -b new_branch_name | |
HEAD is now at 91b5a44... Update email address | |
james@debbay:~/.vim/bundle/vim-abolish$ cd .. | |
james@debbay:~/.vim/bundle$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 3 commits. | |
# | |
# 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: vim-abolish (new commits) | |
# | |
no changes added to commit (use "git add" and/or "git commit -a") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What kind of special treatment is the cloned sub-repository getting? It gets committed as a file with mode 160000, and git seems aware that it is a repository.