{"thread":{"id":"31425","subject":"Feature request: short cuts for git add /diff etc","startedAt":"2012-09-04T11:25:42Z","lastAt":"2012-09-04T18:03:38Z","messageCount":3,"participants":["Коньков Евгений","Nazri Ramliy","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198295","messageId":"6110218480.20120904152542@reg.ru","threadId":"31425","inReplyTo":null,"subject":"Feature request: short cuts for git add /diff etc","fromName":"Коньков Евгений","fromEmail":"kes@reg.ru","sentAt":"2012-09-04T11:25:42Z","receivedAt":"2012-09-04T11:25:42Z","isPatch":false,"sender":{"key":"kes@reg.ru","avatar":null},"body":"Hi, Git\n\nChange this:\n# git status\n# On branch yandex_mail_new_api\n# Your branch is ahead of 'origin/yandex_mail_new_api' by 2 commits.\n#\n# Changes not staged for commit:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       modified:   a1.txt\n#       modified:   a2.txt\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       new.txt\n\nto this:\n\n# git status\n# On branch yandex_mail_new_api\n# Your branch is ahead of 'origin/yandex_mail_new_api' by 2 commits.\n#\n# Changes not staged for commit:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       modified(1):   a1.txt\n#       modified(2):   a2.txt\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#   (3)    new.txt\n\n\nsot this allow:\ngit diff 1       same as        git diff a1.txt\ngit diff 2       same as        git diff a2.txt\n\ngit add 1        same as        git add a1.txt\nin case there are may be files with such names I may appply option -s,for example\ngit add [ -s | --stage ] 1 . This will force to add file from list of\n'git status' and do not use '1' as file name.\n\ngit add 3        same as         git add new.txt\n\n\nThis very handy and will keep developer from useless typing =)\n\n-- \n С уважением,\n Коньков Евгений\n Программист\n Регистратор доменных имен REG.RU\n Телефон: +38 (097) 7654-676\n www.reg.ru\n ___________________\n Sincerely yours,\n Konkov Eugen\n Developer\n Accredited domain Registrar REG.RU, LLC.\n Phone: +38 (097) 7654-676\n www.reg.ru/en/\n\nmailto:kes@reg.ru\n"},{"id":"198297","messageId":"CAEY4ZpOw2HUCf6QxUaAQTjCCVxi_TvttW1DFOgrsgbo6PQtfZw@mail.gmail.com","threadId":"31425","inReplyTo":"6110218480.20120904152542@reg.ru","subject":"Re: Feature request: short cuts for git add /diff etc","fromName":"Nazri Ramliy","fromEmail":"ayiehere@gmail.com","sentAt":"2012-09-04T11:51:11Z","receivedAt":"2012-09-04T11:51:11Z","isPatch":false,"sender":{"key":"ayiehere@gmail.com","avatar":"https://avatars.githubusercontent.com/u/164756?v=4"},"body":"On Tue, Sep 4, 2012 at 7:25 PM, Коньков Евгений <kes@reg.ru> wrote:\n> sot this allow:\n> git diff 1       same as        git diff a1.txt\n> git diff 2       same as        git diff a2.txt\n>\n> git add 1        same as        git add a1.txt\n> in case there are may be files with such names I may appply option -s,for example\n> git add [ -s | --stage ] 1 . This will force to add file from list of\n> 'git status' and do not use '1' as file name.\n>\n> git add 3        same as         git add new.txt\n>\n>\n> This very handy and will keep developer from useless typing =)\n\nCheck out git-number[1] and scm_breeze[2]. Both provides similar\nfunctionality to the above.\n\nnazri\nshameless disclaimer: I wrote git-number.\n\n[1] https://github.com/holygeek/git-number\n[2] https://github.com/ndbroadbent/scm_breeze\n"},{"id":"198316","messageId":"7vehmhbr7p.fsf@alter.siamese.dyndns.org","threadId":"31425","inReplyTo":"6110218480.20120904152542@reg.ru","subject":"Re: Feature request: short cuts for git add /diff etc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-04T18:03:38Z","receivedAt":"2012-09-04T18:03:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Коньков Евгений <kes@reg.ru> writes:\n\n> # git status\n> # On branch yandex_mail_new_api\n> # Your branch is ahead of 'origin/yandex_mail_new_api' by 2 commits.\n> #\n> # Changes not staged for commit:\n> #   (use \"git add <file>...\" to update what will be committed)\n> #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> #\n> #       modified(1):   a1.txt\n> #       modified(2):   a2.txt\n> #\n> # Untracked files:\n> #   (use \"git add <file>...\" to include in what will be committed)\n> #\n> #   (3)    new.txt\n>\n>\n> sot this allow:\n> git diff 1       same as        git diff a1.txt\n> git diff 2       same as        git diff a2.txt\n>\n> git add 1        same as        git add a1.txt\n> in case there are may be files with such names I may appply option -s,for example\n> git add [ -s | --stage ] 1 . This will force to add file from list of\n> 'git status' and do not use '1' as file name.\n>\n> git add 3        same as         git add new.txt\n>\n> This very handy and will keep developer from useless typing =)\n\nWhen I know I want to add a1.txt, I can say \"git add a1.txt\", but\nwith your version of Git, I now have to say \"git status\" to first\nfind out what file number a1.txt corresponds to so that I can say\n\"git add 1\"?  Worse yet, after saying \"git diff 1\" to check the\nprogress of a1.txt, which may be long and scroll the output from\n\"git status\" off the top of my screen, I need to run \"git status\"\nagain to see what file number a2.txt corresponds to?\n\nThat does not make any sense even as a typesaver.  Besides, what if\nI have a file whose name is \"1\" that I would want to add?\n\nYou may be looking for either \"git gui\", or \"git add -i\" (if you do\nnot like a windowed environment), both of which would let you choose\npathnames with fewer keystrokes.\n"}]}