Difference between revisions of "Git/notes"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Jump to navigation Jump to search
(Created page with "==Questions== * When <code>git pull github</code> returns this: You asked to pull from the remote 'github', but did not specify a branch. Because this is not the default con...")
 
(answered one question)
Line 1: Line 1:
 
==Questions==
 
==Questions==
 +
 +
* Given that the four possible conditions for a file are "untracked", "unmodified", "modified" and "staged" (according to [http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository this]):
 +
** '''Q:''' If a staged file becomes "unchanged" when it is "committed", does that mean that it is no longer "staged"? Or should we speak of those four conditions as applying to ''changes'' rather than ''files''?
 +
** '''Q:''' If the four conditions apply to changes (not files), then does it make sense to talk about "staging files"?
 +
** '''Q:''' How do you get a list of all the files that have been staged, whether or not they are "modified"?
 +
* When <code>git fetch github master</code> returns this:
 +
From https://github.com/woozalia/w3tpl
 +
  * branch            master    -> FETCH_HEAD
 +
:* '''Q:''' Why don't any new files appear in the local folder?
 +
:* '''Q:''' What does this mean? (Did anything actually happen, and if so, what?)
 +
==Answers==
 
* When <code>git pull github</code> returns this:
 
* When <code>git pull github</code> returns this:
 
  You asked to pull from the remote 'github', but did not specify
 
  You asked to pull from the remote 'github', but did not specify
 
  a branch. Because this is not the default configured remote
 
  a branch. Because this is not the default configured remote
 
  for your current branch, you must specify a branch on the command line.
 
  for your current branch, you must specify a branch on the command line.
:* Q: How do I figure out what branch I want to use?
+
:* '''Q:''' How do I figure out what branch I want to use?
 
+
:** '''A:''' See [[Git/branch|git branch]].
* Given that the four possible conditions for a file are "untracked", "unmodified", "modified" and "staged" (according to [http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository this]):
 
** Q: If a staged file becomes "unchanged" when it is "committed", does that mean that it is no longer "staged"? Or should we speak of those four conditions as applying to ''changes'' rather than ''files''?
 
** Q: If the four conditions apply to changes (not files), then does it make sense to talk about "staging files"?
 
** Q: How do you get a list of all the files that have been staged, whether or not they are "modified"?
 

Revision as of 18:51, 9 March 2015

Questions

  • Given that the four possible conditions for a file are "untracked", "unmodified", "modified" and "staged" (according to this):
    • Q: If a staged file becomes "unchanged" when it is "committed", does that mean that it is no longer "staged"? Or should we speak of those four conditions as applying to changes rather than files?
    • Q: If the four conditions apply to changes (not files), then does it make sense to talk about "staging files"?
    • Q: How do you get a list of all the files that have been staged, whether or not they are "modified"?
  • When git fetch github master returns this:
From https://github.com/woozalia/w3tpl
 * branch            master     -> FETCH_HEAD
  • Q: Why don't any new files appear in the local folder?
  • Q: What does this mean? (Did anything actually happen, and if so, what?)

Answers

  • When git pull github returns this:
You asked to pull from the remote 'github', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
  • Q: How do I figure out what branch I want to use?