git


What does git diff compare to if HEAD is detached?


From the man page (but I don't get it):
git diff [--options] --cached [<commit>] [--] [<path>...]
This form is to view the changes you staged for the next commit relative to the
named <commit>. Typically you would want comparison with the latest commit, so
if you do not give <commit>, it defaults to HEAD. If HEAD does not exist (e.g.
unborn branches) and <commit> is not given, it shows all staged changes.
--staged is a synonym of --cached.
It makes no difference whether HEAD is detached or not. Detached HEAD does not mean that HEAD is not available, just that HEAD is pointing to some commit directly, not to a branch.

Related Links

How to get current state of HEAD in git?
Pushing local repository changes to a Github
IntelliJ losing modules after Github cloning
If a git branch is pushed to the remote and then deleted before it is merged, is it still part of the repository history?
git beanstalkapp staging branch has all changes from master branch but master doesn't have all changes from staging
How to not commit temporary debug statements
Git move everything in a directory one directory up
To localhost from server deployment of Jenkins + Sonar
Why is my .git/objects folder 175GB?
Jenkins pipeline branch name returns null
Gitlab migration - clone Issues & Merge Requests
Git - Pushing big file gives error, remote: fatal: error when closing sha1 file: Input/output error
Git undo deleted files after commit and push
Git Hooks Remote Work Tree Commit
How to remove folder subtree from a git repository? Is that possible?
Azure git push returning 403

Categories

HOME
cordova
qt5
scadalts
highcharts
custom-attributes
houndify
post
mariadb
android-animation
inform7
raspberry-pi3
soundcloud
mit-scratch
libreoffice-base
ietf-netmod-yang
hudson
google-login
pyside
spring-statemachine
google-app-invites
intercept
packet-capture
unimrcp
angle
github-api
size-classes
inversifyjs
pdb-files
choropleth
sqlcedatareader
javapoet
cassandra-3.0
dexguard
codeigniter-2
webdrivermanager-java
gooddata
smartassembly
enzyme
notnull
xilinx-edk
fixture
singleton-type
reddit
google-truth
burn
http-status-code-415
lpc
cakephp-3.3
c++1z
google-url-shortener
local-variables
launch-agent
gm
spoon
ienumerable
nsolid
rc4-cipher
spawn-fcgi
stl-format
listboxitem
stunnel
traffic-simulation
cirqus
meter
elmah.mvc
window-position
smslib
cordova-chrome-app
certificatestore
agsxmpp
jxa
uploadifive
ews-managed-api
ember-testing
kindle-fire
aglio
google-playground
socketrocket
countries
problem-steps-recorder
citrix-access-gateway
facebook-events
pull-to-refresh
cgimagesource
iwebkit
jax-rpc
trusted-timestamp
keymando
kiln
flotr
mindmapping
google-instant-previews
iphone-sdk-4.1
trx
sqlmetal
table-driven

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile