Friday 15 January 2010

git - How to track but not stage and how to unstage but not untrack? -


I have two short questions:

  • How can I track files but Without staging them?
  • How can I separate them from files for the undiscovered committee? Note: I know that I can make an initial commitment to track files and track my files from there Starting but what is particularly possible that I am asking above?

    I joined the git add-N & lt; Expr & gt; , but it tracks the file and adds it to:

      psc: \> gt; GIT add-n file A psc: \ & gt; Change to Git Status # Branch Master #: # (Use # GIT Reset Head & File; Use File) # # New File: FileA # # Not committed to changes: # ("Git add & lt; file & gt; ..." to be committed to what will be updated) # ("git checkout - " to discard changes in the work directory. .. ") # # Modified: README.md # modified: composer lock # modified: file a #   

    if i Not Reset git, then head of the file A or git rm - cached fileA it Anstojh but also Antrek file. This command git rm fileA suggests using flag-F which removes the file by mistake.

    Therefore, it is possible not only on the track but on the stage, and only unstable for unstable files?

    Update (May 2015)

    I tried Git add-n & lt; Expr & gt; to use, but it tracks the file and adds it to the commit:

    It is no longer with the upcoming Git 2.5 (Q2 2015) .


    Original Answer (March 2013)

    How can I destabilize them for unseen files?

    This is the official way:

      reset git HEAD file   

    but since this is a new file , You uncheck it properly (delete it from the index, referencing it in no time).

    Starting to track a file means that it should be placed in an index or commute.

    I would recommend creating a branch for those files, they have been sent there to add in order. Transposed files are files that were in the previous snapshot ; they can be unaffiliated, modified, or staged < Li> Untrecked files are everything else; Any file in your work directory that was not in your last snapshot and is not in your staging area (index)

    This means that, for a new file, it does not mean untreck it.

     Tracked files in git

    " ".

No comments:

Post a Comment