| 2020-09-15 |
| ← g2anj left | 00:04 |
| → g2anj joined | 00:05 |
| ← dqx_ left | 00:07 |
| → suzukisama joined | 00:08 |
| → Xenguy joined | 00:08 |
| ← captain42 left | 00:08 |
| → captain42 joined | 00:12 |
| → Thominus joined | 00:13 |
| → cd joined | 00:14 |
| → yonder joined | 00:15 |
| ← tiin57 left | 00:15 |
| ← Olipro left | 00:15 |
| ← saveNexit left | 00:17 |
| → saveNexit joined | 00:17 |
| → tiin57 joined | 00:18 |
| → adder joined | 00:19 |
|
adder
| i want to become really comfortable with git. i can only add, commit, push, maybe amend and maybe a couple other things. is there a nice guide that goes from 0 to hero? | 00:20 |
|
rafasc
| !book is a good start | 00:20 |
|
gitinfo
| There are several good books available about git; 'Pro Git' is probably the best: http://git-scm.com/book but also look at !bottomup !cs !gcs !designers !gitt !vcbe and !parable | 00:20 |
|
adder
| great. thanks. | 00:21 |
| ← cosimone left | 00:25 |
| → cosimone joined | 00:25 |
| ← dfee left | 00:27 |
| ← AnAverageHuman left | 00:28 |
| ← UlrichH left | 00:30 |
| → cliluw joined | 00:31 |
| ← yuljk left | 00:36 |
| → BackupBackupNick joined | 00:39 |
| ← saveNexit left | 00:40 |
| → misuto2 joined | 00:40 |
| → saveNexit joined | 00:40 |
| → xSke_ joined | 00:41 |
| ← Aki-lucky left | 00:41 |
| ← misuto left | 00:41 |
| ← xSke left | 00:41 |
| ← chachasmooth left | 00:41 |
| misuto2 → misuto | 00:41 |
| → chachasmooth_ joined | 00:41 |
| xSke_ → xSke | 00:41 |
| → yuljk joined | 00:43 |
| ← tiin57 left | 00:44 |
| → tiin57 joined | 00:47 |
| → maestrojed joined | 00:48 |
| ← cd left | 00:51 |
| ← BackupBackupNick left | 00:53 |
| ← saveNexit left | 00:54 |
| → Olipro joined | 00:55 |
| → AnAverageHuman joined | 01:03 |
| ← suzukisama left | 01:04 |
| ← mindCrime left | 01:04 |
| → mindCrime joined | 01:05 |
| ← gergap left | 01:10 |
| ← crose left | 01:11 |
| → MaximusColourum joined | 01:12 |
| ← MaximusColourum left | 01:12 |
| ← haasn left | 01:12 |
| → haasn joined | 01:13 |
| ← tiin57 left | 01:14 |
| ← cuppajoeman left | 01:18 |
| → tiin57 joined | 01:18 |
| ← jrnieder left | 01:23 |
| → clara97 joined | 01:25 |
| ← bruce_lee left | 01:26 |
| → stats4647 joined | 01:27 |
| ← F0rTex left | 01:27 |
| → F0rTex joined | 01:29 |
| → mat001 joined | 01:31 |
| ← mat001_ left | 01:32 |
| ← stats4647 left | 01:32 |
| ← irc_user left | 01:38 |
| ← vngx left | 01:39 |
| ← tiin57 left | 01:44 |
| → tiin57 joined | 01:47 |
| → bkuhlmann joined | 01:47 |
| → akem_ joined | 01:50 |
| ← akem left | 01:51 |
| ← Gurkenglas left | 01:54 |
| ← nvmd left | 02:00 |
| ← justache left | 02:01 |
| → justache joined | 02:02 |
| ← gast0n left | 02:04 |
| ← kleisli_ left | 02:08 |
|
bkuhlmann
| If I have the following section in my .gitconfig: [includeIf "gitdir:~/Downloads/tutorial/"]. What is the right command to remove that entire section from the command line? Should I use "git config --glboal --unset" or maybe "--remove-section"? | 02:12 |
| ← tiin57 left | 02:14 |
| lagothrix → Guest6694 | 02:15 |
| → lagothrix joined | 02:16 |
| ← chachasmooth_ left | 02:17 |
| → tiin57 joined | 02:18 |
| → chachasmooth joined | 02:18 |
| ← Guest6694 left | 02:18 |
| ← matelot left | 02:19 |
|
rafasc
| git config --remove-section includeIf."gitdir:~/Downloades/tutorial/" | 02:29 |
| ← sudoforge left | 02:29 |
| → thomasross joined | 02:31 |
|
rafasc
| bkuhlmann: but I think both would work, if you use --unset, you would include .path there. | 02:32 |
| ← iffraff left | 02:33 |
|
bkuhlmann
| rafasc: Thanks. I tried: git config --global --remove-section includeIf.gitdir:~/Downloades/tutorial/ and got: fatal: no such section: includeIf.gitdir:~/Downloades/tutorial/ | 02:35 |
| ← rafasc left | 02:35 |
|
bkuhlmann
| Quoting or unquoting doesn't seem to change behavior. | 02:36 |
| ← init left | 02:39 |
| ← nerdypepper left | 02:41 |
| ← cbreak left | 02:42 |
| → kleisli_ joined | 02:42 |
| → cbreak joined | 02:43 |
| ← tiin57 left | 02:44 |
| → tiin57 joined | 02:48 |
| ← fatalhalt left | 02:59 |
| ← justache left | 03:00 |
| ← Cabanossi left | 03:00 |
| → justache joined | 03:01 |
| → Goplat joined | 03:03 |
| → fatalhalt joined | 03:04 |
| ← thomasross left | 03:06 |
| ← bkuhlmann left | 03:06 |
| → Cabanossi joined | 03:07 |
| → acetakwas joined | 03:08 |
| → drbean joined | 03:10 |
| ← Codaraxis__ left | 03:13 |
| → sudoforge joined | 03:14 |
| ← arcatech left | 03:15 |
| ← tiin57 left | 03:15 |
| → tiin57 joined | 03:17 |
| → jwt joined | 03:19 |
| ← maestrojed left | 03:29 |
| → Lucas_Gray joined | 03:31 |
| ← inkbottle left | 03:34 |
| → inkbottle joined | 03:34 |
| → Muimi joined | 03:35 |
| → dfee joined | 03:38 |
| ← mir100 left | 03:40 |
| → mir100 joined | 03:41 |
| ← mindCrime left | 03:41 |
| ← mir100 left | 03:41 |
| → mir100 joined | 03:42 |
| ← jwt left | 03:44 |
| ← tiin57 left | 03:44 |
| ← mirrorbird left | 03:45 |
| → sgen joined | 03:46 |
| → mirrorbird joined | 03:47 |
| → tiin57 joined | 03:47 |
| → zumba_addict joined | 03:50 |
|
zumba_addict
| Good evening all. I have a commit hash that I want to search in command line. Can we pass it in git so I can check what it is? | 03:51 |
| → jwt joined | 03:52 |
|
zumba_addict
| i'm trying `git log --all --grep='mypattern'` but it pauses | 03:55 |
|
| it worked, found it | 03:56 |
| → def_jam joined | 03:57 |
| → Guest20 joined | 03:58 |
| ← eblip left | 03:58 |
| ← justache left | 04:00 |
| → stats4647 joined | 04:00 |
| → justache joined | 04:01 |
| → g00s_ joined | 04:02 |
| ← inkbottle left | 04:03 |
| → inkbottle joined | 04:04 |
| ← Eryn_1983_FL left | 04:04 |
| ← g00s left | 04:04 |
| ← justanotheruser left | 04:04 |
| ← stats4647 left | 04:05 |
| → cim2091 joined | 04:05 |
| ← cim209 left | 04:05 |
| cim2091 → cim209 | 04:05 |
| → Eryn_1983_FL joined | 04:06 |
| ← random_yanek left | 04:06 |
| ← th_ left | 04:07 |
| → th_ joined | 04:10 |
| ← tiin57 left | 04:14 |
| → tiin57 joined | 04:17 |
| → random_yanek joined | 04:17 |
| → irc_user joined | 04:21 |
| ← opal left | 04:22 |
| ← clara97 left | 04:25 |
| → justanotheruser joined | 04:26 |
| ← justache left | 04:28 |
| → justache joined | 04:29 |
| ← misuto left | 04:30 |
| → misuto joined | 04:31 |
| ← tiin57 left | 04:45 |
| ← jwt left | 04:46 |
| → jwt joined | 04:46 |
| ← sgen left | 04:47 |
| → tiin57 joined | 04:48 |
| ← drbean left | 04:54 |
| ← joako left | 04:56 |
| ← Hello71 left | 04:57 |
| → Hello71 joined | 04:57 |
| ← jwt left | 04:59 |
| → opal joined | 05:00 |
| ← cosimone left | 05:00 |
| → cosimone joined | 05:00 |
| ← causasui left | 05:01 |
| → drbean joined | 05:05 |
| ← AnAverageHuman left | 05:06 |
| → joako joined | 05:07 |
| ← magic_ninja left | 05:10 |
| ← geosmile left | 05:12 |
| → jwt joined | 05:13 |
|
FH_thecat
| I can see diff of a particular file between two tags: | 05:13 |
|
| git diff v4.9 v4.10 -- brd.c | 05:13 |
|
| but how do I show the actual commit, where this change was made ? | 05:13 |
| ← tiin57 left | 05:14 |
|
FH_thecat
| the above git diff command only shows me: index 0c76d4016eeb..3adc32a3153b 100644 | 05:15 |
|
| but not the full commit | 05:15 |
| → tiin57 joined | 05:17 |
| → magic_ninja joined | 05:29 |
| → arcatech joined | 05:36 |
| ← arcatech left | 05:37 |
| ← sudoforge left | 05:44 |
| ← tiin57 left | 05:44 |
| ← dfee left | 05:45 |
| ← justanotheruser left | 05:47 |
| → tiin57 joined | 05:47 |
| → theoceaniscool joined | 05:51 |
| ← kleisli_ left | 05:51 |
| → bocaneri joined | 05:52 |
| ← j7k6 left | 05:54 |
| ← jwt left | 05:57 |
| → jwt joined | 05:59 |
| → j7k6 joined | 06:00 |
| → konrados joined | 06:00 |
| ← jwt left | 06:02 |
| → feriman joined | 06:02 |
| → clime joined | 06:10 |
| ← tiin57 left | 06:14 |
| ← FH_thecat left | 06:15 |
| ← Lucas_Gray left | 06:15 |
| → dfee joined | 06:16 |
| → tiin57 joined | 06:17 |
| → rfuentess joined | 06:21 |
| ← Shentino left | 06:28 |
| → Shentino joined | 06:29 |
| ← Shentino left | 06:30 |
| → Shentino joined | 06:30 |
| → kleisli_ joined | 06:32 |
| ← kent\n left | 06:34 |
| → kent\n joined | 06:36 |
| ← thiago left | 06:36 |
| → pikapika joined | 06:44 |
| ← tiin57 left | 06:44 |
| → tiin57 joined | 06:48 |
| akem_ → akem | 06:53 |
| → kaartic joined | 06:53 |
| ← drbean left | 06:53 |
| ← cliluw left | 06:54 |
| → cliluw joined | 06:55 |
| ← tgunr left | 06:56 |
| → mat001_ joined | 06:56 |
| ← mat001 left | 06:58 |
| ← Sonderblade left | 06:59 |
| → Sonderblade joined | 07:00 |
| ← theoceaniscool left | 07:01 |
| ← unluckyshrubbery left | 07:01 |
| ← Goplat left | 07:03 |
| ← onmeac left | 07:07 |
| ← POQDavid left | 07:11 |
| ← acetakwas left | 07:12 |
| ← pikapika left | 07:12 |
| → pikapika joined | 07:13 |
| ← pikapika left | 07:13 |
| ← nikivi left | 07:13 |
| ← Trieste left | 07:14 |
| ← tiin57 left | 07:14 |
| → Trieste joined | 07:15 |
| → pikapika joined | 07:16 |
| → nikivi joined | 07:16 |
| → acetakwas joined | 07:17 |
| → tiin57 joined | 07:17 |
| → POQDavid joined | 07:18 |
| → Xenguy_ joined | 07:20 |
| ← irc_user left | 07:21 |
| → FabioP joined | 07:21 |
| → kleisli__ joined | 07:21 |
| ← mirrorbird left | 07:22 |
| ← Xenguy left | 07:22 |
| ← konrados left | 07:23 |
| ← kleisli_ left | 07:23 |
| → FH_thecat joined | 07:23 |
| ← yonder left | 07:24 |
|
hendry
| how does one add a .git/hooks/pre-commit into a git repo? I don't understand how to bring one's linting rules along with the repo ... | 07:25 |
|
ikke
| You can't | 07:25 |
|
| it's a severe security issue if you could do that | 07:25 |
|
| users have to opt-in to these things | 07:25 |
| → konrados joined | 07:26 |
|
osse
| FH_thecat: the diff you see in "git diff v4.9 v4.10 -- brd.c" can be the result of combining many different commits | 07:26 |
|
hendry
| ok, so if I create a hook, how do I ensure developers I'm working with, "opt-in"? | 07:26 |
|
| a Makefile to copy in the hook? | 07:27 |
|
osse
| FH_thecat: try: git log -p v4.9..v4.10 -- brd.c and git log -p v4.10..v4.9 -- brd.c | 07:27 |
|
ikke
| include it in the repo itself, add a note in the readme how to install it, or provide a script that the users can call | 07:27 |
|
| hendry: for example, yes | 07:27 |
|
hendry
| ikke: I see, thank you | 07:28 |
|
ikke
| But please, make it really clear that it's happening. It would be very anoying if just building the project would install hooks | 07:29 |
| ← donofrio_ left | 07:29 |
|
| ikke looks at this nodejs package that clobbers your repo with hooks | 07:30 |
| → dynetrekk joined | 07:30 |
|
dynetrekk
| Hi, how can I checkout a directory sub-tree of my project as it is on master? I want to undo some changes I accidentally committed on my feature branch. | 07:31 |
|
selckin
| git checkout master -- dir | 07:31 |
| → oxymoron93 joined | 07:31 |
| → z8z joined | 07:33 |
| ← zumba_addict left | 07:36 |
| → Guest20_ joined | 07:38 |
| ← Guest20 left | 07:39 |
| ← vicfred left | 07:42 |
| ← tiin57 left | 07:44 |
| ← Sonderblade left | 07:46 |
| → wrobinso1 joined | 07:46 |
| → tiin57 joined | 07:47 |
| ← wrobinson left | 07:48 |
| → akem_ joined | 07:51 |
| ← akem left | 07:51 |
| → chiastre_ joined | 07:56 |
|
dynetrekk
| selckin ah, that obvious, didn't even realize. Thanks! | 07:56 |
| → vicfred joined | 07:56 |
| ← chiastre left | 07:58 |
| g00s_ → g00s | 07:58 |
| ← inkbottle left | 08:01 |
| → zebrag joined | 08:01 |
| → dermoth_ joined | 08:02 |
| → stats4647 joined | 08:02 |
| ← dermoth left | 08:02 |
| dermoth_ → dermoth | 08:02 |
| → mikecmpbll joined | 08:03 |
| ← stats4647 left | 08:07 |
| → Gurkenglas joined | 08:07 |
| → shabius_ joined | 08:08 |
| → sudoforge joined | 08:10 |
| ← shabius left | 08:11 |
| → drbean joined | 08:14 |
| ← tiin57 left | 08:14 |
| → tiin57 joined | 08:17 |
|
FabioP
| in gitlab or git there is a tool to see a particular file and all of its history changes in row? | 08:18 |
|
| like git log | 08:19 |
|
geirha
| git log -p -- file | 08:20 |
| ← akem_ left | 08:20 |
|
FabioP
| exactly, is there a way to do it in gitlab too? | 08:21 |
|
geirha
| you can get a list of commits that touched the file at least | 08:22 |
|
FabioP
| i would rather see file content directly without jumping from commit to commit | 08:23 |
| ← Xiti left | 08:25 |
| ← drbean left | 08:29 |
| → KnoP joined | 08:29 |
| → akem joined | 08:34 |
| → supercoven joined | 08:35 |
| → unluckyshrubbery joined | 08:35 |
| → theoceaniscool joined | 08:42 |
| ← feriman left | 08:43 |
| ← tiin57 left | 08:44 |
| ← Tobbi_ left | 08:46 |
| → feriman joined | 08:48 |
| → tiin57 joined | 08:48 |
| → Tobbi_ joined | 08:48 |
| → crose joined | 08:50 |
| → mirrorbird joined | 08:50 |
| → gergap joined | 08:58 |
| ← magic_ninja left | 08:58 |
| → magic_ninja joined | 08:59 |
| ← g00s left | 09:04 |
| → dionysus69 joined | 09:05 |
| → Nikita joined | 09:07 |
| Nikita → Guest75650 | 09:07 |
| ← nikivi left | 09:10 |
| Guest75650 → nikivi | 09:10 |
| ← tiin57 left | 09:14 |
| → Anticom joined | 09:17 |
| → tiin57 joined | 09:17 |
| → shtrb joined | 09:22 |
| ← acetakwas left | 09:22 |
| → acetakwas joined | 09:23 |
|
shtrb
| How can I push all my local branches to their remotes at once ? (modifing all authors locally and wish to push at once to update all my remotes ) | 09:24 |
| → Lucas_Gray joined | 09:25 |
| ← kaartic left | 09:25 |
| → calcul0n joined | 09:29 |
| → Intelo joined | 09:34 |
|
Intelo
| How do I make a branch from a remote branch? | 09:34 |
|
| $ git checkout -b uak-master uak/master | 09:34 |
|
| fatal: 'uak/master' is not a commit and a branch 'uak-master' cannot be created from it | 09:34 |
|
| uak/master is the remote branch. Uak is the origin | 09:35 |
| ← Betal left | 09:38 |
| ← FabioP left | 09:40 |
|
ikke
| Intelo: does git branch -r list it? | 09:40 |
|
osse
| ikke: uak or Uak ? | 09:40 |
| → no_gravity joined | 09:40 |
|
osse
| that was for Intelo | 09:40 |
|
Intelo
| checking | 09:41 |
| → xcm joined | 09:41 |
|
no_gravity
| I have a 11kb json file in my repo. All on one line. Is it possible to do a git diff of a beautified version? | 09:41 |
| → tgunr joined | 09:41 |
|
osse
| no_gravity: yes | 09:41 |
|
Intelo
| ikke: git branch -r does not list uak | 09:41 |
|
| ikke: osse https://termbin.com/3ajs | 09:41 |
|
osse
| no_gravity: GIT_EXTERNAL_DIFF would work | 09:41 |
|
no_gravity
| osse: I would have to configure git to use a different diff program? | 09:42 |
|
ikke
| Intelo: git fetch | 09:42 |
|
no_gravity
| osse: Can I do that on the command line via -c ...? | 09:42 |
|
osse
| no_gravity: if you want it permanently, yes | 09:42 |
|
no_gravity
| osse: I just need it once. | 09:42 |
| ← mir100 left | 09:42 |
|
Intelo
| ikke: I did git fetch but the git branch -r says same | 09:43 |
|
ikke
| do you have more then one remote? | 09:43 |
|
osse
| no_gravity: git show branch1:file.json | prettyprint > tmp1; repeat for branch2; git diff --no-index tmp1 tmp2 | 09:43 |
|
ikke
| git fetch uak | 09:43 |
|
Intelo
| ikke: git remote says origin and uak | 09:44 |
|
ikke
| then ^^ | 09:44 |
|
no_gravity
| osse: Hmm.. I don't have prettyprint | 09:44 |
|
Intelo
| ikke: do I have to fetch for each origin? | 09:44 |
| ← tiin57 left | 09:44 |
|
ikke
| If you don't specify the remote, git uses tracking information to determine the remote to fetch from | 09:44 |
|
Intelo
| ikke: ok. git branch -r prints all branches? then what does -a does? | 09:45 |
|
osse
| no_gravity: replace "prettyprint" with a way of pretty-priting | 09:45 |
|
ikke
| -r only shows remote tracking branches | 09:45 |
|
osse
| I was guessing you had something handy | 09:45 |
|
ikke
| -a shows both local and remote tracking branches | 09:45 |
|
Intelo
| -a shows all? | 09:45 |
|
| ok | 09:45 |
|
| thanks. trying | 09:45 |
|
osse
| no_gravity: if you don't know of any, this works: 'jq .' | 09:46 |
|
no_gravity
| osse: Also don't have jq. But "python -m json.tool" seems to work. | 09:47 |
| → linux_daemon joined | 09:47 |
|
no_gravity
| osse: Thank you! | 09:47 |
|
linux_daemon
| hello everyone, i am using git on windows, that comes with bash.exe . now, i dont know how to edit the profile, when i open new instance of it, to show a timestamp at the beginning, can anyone help me with that? | 09:48 |
| → tiin57 joined | 09:48 |
|
no_gravity
| linux_daemon: A new instance of what? | 09:48 |
|
linux_daemon
| bash.exe | 09:49 |
|
no_gravity
| linux_daemon: I see. No idea. The last time I booted Windows was when Windows 2000 was still a thing. | 09:49 |
|
linux_daemon
| hahah :) thats fair :) | 09:49 |
|
no_gravity
| linux_daemon: The reason was that I was running a startup at that time and the designer wanted a windows machine. | 09:50 |
|
linux_daemon
| i like to work on linux / ubuntu, but i was given a windows machine, and the transition over to it wouldve take like...2-3 days (docker, environment etc) | 09:51 |
|
osse
| linux_daemon: you have to edit the PS1 variable | 09:51 |
|
ikke
| I think you can do some things with PS1 | 09:51 |
|
| :) | 09:51 |
|
osse
| configuring bash.exe is in most ways the same as on any OS | 09:51 |
|
| .bashrc etc. | 09:51 |
|
ikke
| http://bashrcgenerator.com/ | 09:52 |
|
| ~/.bashrc | 09:52 |
|
linux_daemon
| i saw multiple PS1 lines, but not sure which one is for what, and then, dont know how to reload the profile on windows | 09:52 |
|
ikke
| source ~/.bashrc | 09:53 |
|
linux_daemon
| on windows machine? | 09:53 |
|
| ikke: i meant for windows machine, not ubuntu | 09:53 |
| ← hussam left | 09:53 |
| ← no_gravity left | 09:53 |
|
ikke
| linux_daemon: would work exactly the same, in the terminal | 09:54 |
|
| that file is read everytime you start a new terminal | 09:54 |
|
| there is nothing you have to do to reload it | 09:54 |
|
| with source, you can read it in an already existing terminal | 09:54 |
|
linux_daemon
| ok, then, i changed this line: PS1="$ " to: PS1="\t $ " but when i restarted, no luck, still no timestamp | 09:54 |
|
shtrb
| linux_daemon, vim ~/.bashrc from the bash.exe itself (started with git bash) | 09:56 |
|
| shtrb works on gitforwindows ( RIP msysgit) | 09:57 |
|
linux_daemon
| ok, i opened, it is empty | 09:58 |
|
| it gives me a path of: /c/Users/user/.bashsrc | 09:59 |
|
geirha
| it has an s too many | 09:59 |
| → FabioP joined | 09:59 |
|
linux_daemon
| ah | 09:59 |
|
| ok, bashrc, but still empty | 09:59 |
|
shtrb
| Write what ever you like inside it :) you also have .bash_profile and a few others , just remember to close vim and restart git-bash after you edit that file | 09:59 |
| ← tejr left | 10:00 |
|
linux_daemon
| how to add the timestamp now? should i do: PS1="\t $ " only? | 10:00 |
| → tejr joined | 10:00 |
|
geirha
| try it and see | 10:01 |
|
linux_daemon
| it freaking works :D | 10:02 |
|
| thanks thanks :D | 10:02 |
|
shtrb
| linux_daemon, you need to restart the instance for it to be stored and propely set | 10:02 |
|
linux_daemon
| on windows, just restarting the bash.exe is enough? | 10:03 |
|
shtrb
| yes | 10:04 |
|
| ofc , other running instances will not have your changes (because the file had not been loaded) | 10:04 |
| ← mikecmpbll left | 10:08 |
|
shtrb
| would git push --all -f really overwrite all remotes with local branches,or I'm too optimistic for that to work ? | 10:09 |
|
linux_daemon
| it works fine now :) | 10:09 |
|
shtrb
| linux_daemon, good luck ! | 10:09 |
|
| linux_daemon, also have you been able to setup python3 working (for git-filter-repo to work ) ? | 10:10 |
|
linux_daemon
| nope, havent even started that one yet | 10:10 |
|
shtrb
| If you do find a proper solution , please share because git-filter-repo is so much better than git-filter-branch , but I have no idea so far how I can set it to to work under bash.exe | 10:11 |
|
linux_daemon
| will do! | 10:11 |
| → kaartic joined | 10:13 |
| ← tiin57 left | 10:14 |
| → skyline199476 joined | 10:16 |
| → tiin57 joined | 10:18 |
| ← akem left | 10:18 |
| → bruce_lee joined | 10:21 |
| → calcul0n_ joined | 10:22 |
| ← calcul0n left | 10:24 |
| → aw1 joined | 10:24 |
| → mikecmpbll joined | 10:28 |
| ← skyline199476 left | 10:35 |
| → vngx joined | 10:35 |
| → kleisli joined | 10:38 |
| ← kaartic left | 10:38 |
| ← mikecmpbll left | 10:39 |
| ← kleisli__ left | 10:40 |
| ← jaziz left | 10:42 |
| ← tiin57 left | 10:44 |
| ← nikivi left | 10:45 |
| ← acetakwas left | 10:45 |
| → nikivi joined | 10:45 |
| ← pikapika left | 10:45 |
| ← POQDavid left | 10:45 |
| → pikapika joined | 10:46 |
| ← nikivi left | 10:46 |
| ← pikapika left | 10:47 |
| → tiin57 joined | 10:47 |
| → mindCrime joined | 10:48 |
| → pikapika joined | 10:49 |
| ← mirrorbird left | 10:50 |
| → POQDavid joined | 10:50 |
| → nikivi joined | 10:51 |
| → acetakwas joined | 10:52 |
| → akem joined | 10:55 |
| ← Guest20_ left | 10:58 |
| → Guest20 joined | 11:02 |
| ← tejr left | 11:02 |
| → tejr joined | 11:02 |
| → kaartic joined | 11:09 |
| ← mindCrime left | 11:12 |
| ← tiin57 left | 11:14 |
| → APic joined | 11:16 |
| → tiin57 joined | 11:17 |
| ← dfee left | 11:18 |
| → mirrorbird joined | 11:27 |
| ← cdown left | 11:28 |
| → cdown joined | 11:30 |
| ← mirrorbird left | 11:32 |
| ← FabioP left | 11:32 |
| ← aw1 left | 11:33 |
| → mindCrime joined | 11:33 |
| ← milkt left | 11:34 |
| → aw1 joined | 11:34 |
| → milkt joined | 11:34 |
|
osse
| Does git blame -L50,60 file.txt actually do less work than git blame file.txt? | 11:35 |
|
| I noticed that libgit2 doesn't offer an equivalent to -L | 11:35 |
|
ikke
| You'd naively assume it does not have to trace every line of a file | 11:36 |
| ← tgunr left | 11:36 |
|
osse
| I am mistaken. It does offer that. It's just that the Rust bindings down | 11:37 |
|
| don't | 11:37 |
| ← tiin57 left | 11:44 |
| ← vdamewood left | 11:45 |
| ← fcserr left | 11:47 |
| → tiin57 joined | 11:47 |
| → vdamewood joined | 11:47 |
|
Intelo
| whats the lightest selfthosted solution alternative to github? | 11:48 |
|
ikke
| gogs? | 11:48 |
|
| /gitea | 11:48 |
|
selckin
| do you want issues & stuff or just repos | 11:48 |
|
Intelo
| gitea? | 11:48 |
|
| selckin: just repos | 11:49 |
|
ikke
| https://gitea.io/en-us/ | 11:49 |
|
| https://gogs.io/ | 11:49 |
|
Intelo
| ikke: whats lightest among the both? | 11:49 |
|
ikke
| I have no idea | 11:49 |
|
Intelo
| selckin: ? | 11:49 |
|
ikke
| I think one forked from the other | 11:49 |
|
selckin
| gitolite used to be the thing | 11:49 |
|
Intelo
| selckin: which one does not have issues but only repos? | 11:49 |
|
ikke
| gitolite + cgit if you don't need issues / pull requests | 11:50 |
|
Intelo
| ikke: I just need repos and PRs | 11:50 |
|
ikke
| Then either gogs or gitea | 11:50 |
|
Intelo
| ok. | 11:50 |
| ← nikivi left | 11:50 |
| ← acetakwas left | 11:50 |
| ← pikapika left | 11:51 |
| ← POQDavid left | 11:51 |
| → nikivi joined | 11:51 |
| ← nikivi left | 11:51 |
| → nikivi joined | 11:55 |
| → acetakwas joined | 11:55 |
| → pikapika joined | 11:55 |
| → POQDavid joined | 11:55 |
| ← Kaivo left | 11:58 |
| ← maxwilliamson left | 11:59 |
| → maxwilliamson joined | 11:59 |
| → Kaivo joined | 12:00 |
| ← h3ck left | 12:00 |
| → drbean joined | 12:01 |
| ← kleisli left | 12:02 |
|
ws2k3
| how can i localy remove a file from git but dont remove it upstream? | 12:02 |
| → kleisli joined | 12:03 |
|
selckin
| don't think you can (in a sane way) | 12:03 |
| → stats4647 joined | 12:04 |
| ← stats4647 left | 12:08 |
| ← Guest20 left | 12:13 |
| ← Lucas_Gray left | 12:14 |
| ← tiin57 left | 12:14 |
| → Lucas_Gray joined | 12:16 |
| ← berndj left | 12:16 |
| → berndj joined | 12:17 |
| → tiin57 joined | 12:18 |
| ← linux_daemon left | 12:20 |
| ← crose left | 12:24 |
| ← nikivi left | 12:25 |
| ← pikapika left | 12:25 |
| → nikivi joined | 12:25 |
| → pikapika joined | 12:25 |
| → sgen joined | 12:26 |
| ← acetakwas left | 12:27 |
| ← nikivi left | 12:27 |
| → nikivi joined | 12:27 |
| → acetakwas joined | 12:27 |
| ← z8z left | 12:30 |
| ← mat001_ left | 12:30 |
| ← epoll left | 12:32 |
| → epoll joined | 12:33 |
| ← Gurkenglas left | 12:41 |
| ← tiin57 left | 12:44 |
| → tiin57 joined | 12:48 |
| ← Xenguy_ left | 12:56 |
| → donofrio joined | 13:02 |
| → init joined | 13:05 |
| ← sudoforge left | 13:07 |
| → mescalinum joined | 13:13 |
| ← tiin57 left | 13:14 |
| → tiin57 joined | 13:18 |
| → Guest20 joined | 13:22 |
| ← vdamewood left | 13:23 |
| ← swimmer left | 13:24 |
| ← Guest20 left | 13:28 |
| → swimmer joined | 13:29 |
| ← sgen left | 13:30 |
| ← acetakwas left | 13:38 |
| ← pikapika left | 13:38 |
| ← nikivi left | 13:39 |
| → acetakwas joined | 13:39 |
| ← POQDavid left | 13:39 |
| ← acetakwas left | 13:39 |
| → nikivi joined | 13:40 |
| → mns joined | 13:40 |
| → acetakwas joined | 13:40 |
| ← acetakwas left | 13:40 |
| → POQDavid joined | 13:40 |
| ← nikivi left | 13:40 |
| ← POQDavid left | 13:41 |
| → nikivi joined | 13:41 |
| → CodeSlingerPaul joined | 13:41 |
| ← akem left | 13:41 |
| → POQDavid joined | 13:41 |
| ← nikivi left | 13:42 |
| → pikapika joined | 13:42 |
| ← shtrb left | 13:42 |
| ← pikapika left | 13:42 |
| → pikapika joined | 13:43 |
| ← tiin57 left | 13:44 |
| → higherorderbit joined | 13:45 |
| ← oxymoron93 left | 13:47 |
| ← mns left | 13:47 |
| → tiin57 joined | 13:47 |
| → maestrojed joined | 13:49 |
| ← konrados left | 13:49 |
| → irc_user joined | 13:50 |
| ← POQDavid left | 13:50 |
| → konrados joined | 13:50 |
| → rfuentess__ joined | 13:51 |
| → POQDavid joined | 13:51 |
| ← rfuentess left | 13:53 |
| ← theoceaniscool left | 13:53 |
| ← adder left | 13:53 |
| → metametapod_ joined | 13:57 |
| → LasseVK_ joined | 13:57 |
| → mricon_ joined | 13:57 |
| → jetpack_joe_ joined | 13:57 |
| → heinrich5991_ joined | 13:57 |
| → jkhsjdhj- joined | 13:57 |
| → ghormoon_ joined | 13:57 |
| → BlueShark_ joined | 13:57 |
| → rfv_ joined | 13:57 |
| → jakesyl_ joined | 13:57 |
| → moviuro_ joined | 13:57 |
| → graphicsv_ joined | 13:57 |
| → coffeejunk_ joined | 13:57 |
| → themill_ joined | 13:57 |
| → n-st- joined | 13:58 |
| → gruetze_ joined | 13:58 |
| → orioles joined | 13:58 |
| → SrPx_ joined | 13:58 |
| → Lea2 joined | 13:58 |
| → carlesc_ joined | 13:59 |
| → Nickeeh joined | 13:59 |
| → netwoodle joined | 13:59 |
| → ixian8 joined | 13:59 |
| → Gurkenglas joined | 14:00 |
| → prit_ joined | 14:00 |
| ← carlesc left | 14:00 |
| ← SrPx left | 14:00 |
| ← prit left | 14:00 |
| ← jakesyl left | 14:00 |
| ← BlueShark left | 14:00 |
| ← LasseVK left | 14:00 |
| ← graphicsv left | 14:00 |
| ← morguldir left | 14:00 |
| ← jetpack_joe left | 14:00 |
| heinrich5991_ → heinrich5991 | 14:00 |
| ← batrick left | 14:00 |
| ← metametapod left | 14:00 |
| ← kashike left | 14:00 |
| ← leah2 left | 14:00 |
| ← mricon left | 14:00 |
| ← wynn left | 14:00 |
| ← lambda left | 14:00 |
| ← geirha left | 14:00 |
| ← coffeejunk left | 14:00 |
| ← deepy left | 14:00 |
| ← jkhsjdhjs left | 14:00 |
| ← Nothing4You left | 14:00 |
| ← Nickeeh_ left | 14:00 |
| jkhsjdhj- → jkhsjdhjs | 14:00 |
| carlesc_ → carlesc | 14:00 |
| netwoodle → noodle | 14:00 |
| prit_ → prit | 14:00 |
| LasseVK_ → LasseVK | 14:00 |
| n-st- → n-st | 14:00 |
| themill_ → themill | 14:00 |
| → Seveas_ joined | 14:00 |
| metametapod_ → metametapod | 14:00 |
| mricon_ → mricon | 14:00 |
| coffeejunk_ → coffeejunk | 14:00 |
| → bingos joined | 14:00 |
| graphicsv_ → graphicsv | 14:00 |
| BlueShark_ → BlueShark | 14:00 |
| jetpack_joe_ → jetpack_joe | 14:00 |
| jakesyl_ → jakesyl | 14:00 |
| rfv_ → rfv | 14:00 |
| SrPx_ → SrPx | 14:00 |
| → theoceaniscool joined | 14:02 |
| ← drbean left | 14:03 |
| → sstutz joined | 14:03 |
| → robertparkerx joined | 14:03 |
| → uidzer0 joined | 14:03 |
| → aib joined | 14:03 |
| ← mjh4386 left | 14:03 |
| → mjh4386 joined | 14:05 |
| ← steven left | 14:06 |
| → batrick joined | 14:06 |
| → morguldir joined | 14:06 |
| → Nothing4You joined | 14:06 |
| → WakiMiko joined | 14:06 |
| → deepy joined | 14:07 |
| → kashike joined | 14:07 |
| → no_maam joined | 14:07 |
| → EvilJStoker joined | 14:07 |
| → geirha joined | 14:08 |
| → leah2 joined | 14:08 |
| ← feriman left | 14:08 |
| ← Kaivo left | 14:09 |
| → lambda joined | 14:10 |
| ← konrados left | 14:11 |
| → Kaivo joined | 14:12 |
| → feriman joined | 14:13 |
| → pulec joined | 14:13 |
| ← tiin57 left | 14:14 |
| → tiin57 joined | 14:18 |
| ← sweatsuit left | 14:18 |
| → sweatsuit joined | 14:22 |
| → trinityblade joined | 14:23 |
| → thiago joined | 14:23 |
| → gast0n joined | 14:25 |
| ← ninjin_ left | 14:29 |
| → ninjin_ joined | 14:30 |
| ← diogenese left | 14:31 |
| ← pikapika left | 14:31 |
| → diogenese joined | 14:31 |
| ← POQDavid left | 14:31 |
| → pikapika joined | 14:33 |
| ← pikapika left | 14:33 |
| → POQDavid joined | 14:33 |
| ← aw1 left | 14:33 |
| ← POQDavid left | 14:34 |
| → eb0t joined | 14:34 |
| → pikapika joined | 14:34 |
| → POQDavid joined | 14:35 |
| ← sweatsuit left | 14:36 |
| gruetze_ → gruetzkopf | 14:37 |
| ← maxwilliamson left | 14:38 |
| ← kaartic left | 14:38 |
| → maxwilliamson joined | 14:38 |
| rfuentess__ → rfuentess | 14:40 |
| → lucasb joined | 14:41 |
| ← tiin57 left | 14:44 |
| → sweatsuit joined | 14:45 |
| → stats4647 joined | 14:45 |
| → justanotheruser joined | 14:47 |
| → thomasross joined | 14:47 |
| → tiin57 joined | 14:47 |
| ← sweatsuit left | 14:48 |
| → sweatsuit joined | 14:50 |
|
CrtxReavr
| ws2k3, well, you can just delete the local file, but of course, it'll come back if you do a pull. | 14:51 |
| → ksynwa joined | 14:52 |
|
ws2k3
| CrtxReavr: thxx! | 14:52 |
| → crose joined | 14:52 |
|
ksynwa
| for git format-patch, how can I make it so that the file names don't have `a/` or `b/` before them | 14:52 |
|
| nevermind it's the --no-prefix flag | 14:54 |
| ← sweatsuit left | 14:59 |
| ← dionysus69 left | 15:01 |
| → akem joined | 15:01 |
| → cd joined | 15:01 |
| → lmat joined | 15:02 |
|
lmat
| When I git log --decorate; why do I not see things like origin/3.0 (tag)? | 15:03 |
| → sudoforge joined | 15:05 |
|
nedbat
| lmat: do you see the 3.0 tag? | 15:08 |
|
davidfetter
| hi | 15:12 |
|
| I recall there was a 1-byte change, but not what it was or when. How might I get git to help find it? | 15:13 |
| ← tiin57 left | 15:14 |
| → tiin57 joined | 15:18 |
|
Jookia
| davidfetter: you could use git log --stat to see commit change histograms | 15:23 |
|
davidfetter
| thanks, Jookia :) | 15:24 |
| Lea2 → Learath2 | 15:24 |
| ← Anticom left | 15:25 |
| → flowinho joined | 15:28 |
| ← stats4647 left | 15:29 |
| → stats4647 joined | 15:29 |
| → h3ck joined | 15:34 |
| ← infl00p left | 15:38 |
| → infl00p joined | 15:38 |
| ← trinityblade left | 15:39 |
| ← tiin57 left | 15:44 |
| → tiin57 joined | 15:48 |
| → marslander joined | 15:50 |
| ← rfuentess left | 15:51 |
|
stats4647
| Hi, how do I think about HEAD pointing to a later commit, then my master? Are there two branches? This is the “git log —oneline” after “git submodule update —remote”. Do I now need to check out 1dc96cf ? TIA | 15:53 |
|
| 1dc96cf (HEAD, origin/master, origin/HEAD) [message2] | 15:53 |
|
| fe78fae (master) [message1] | 15:53 |
|
Hello71
| !lol | 15:56 |
|
gitinfo
| A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all | 15:56 |
| ← RandomGuy90 left | 15:58 |
| → RandomGuy90 joined | 15:59 |
| → no_gravity joined | 15:59 |
|
no_gravity
| Can I search the git history for a file that has the suffix '.html' and contains the string 'water'? | 16:00 |
|
ikke
| git log -S 'water' -- '*.html' | 16:02 |
|
no_gravity
| ikke: Awesome, lets see ... | 16:02 |
|
ikke
| strictly, that looks for commits that either add or remove 'water' | 16:02 |
|
no_gravity
| ikke: Is it case sensitive? | 16:03 |
|
| It finds nothing. But the string *is* in some html files. | 16:04 |
|
| Oh, I am wrong. It does find something. | 16:04 |
| → mat001 joined | 16:04 |
|
no_gravity
| And it seems to be case sensitive. | 16:05 |
|
| Any way to make it case insensitive? | 16:06 |
|
ikke
| Hmm, there is --pickaxe-regex, but I don't see any way to toggle case sensitivity | 16:07 |
|
no_gravity
| I see. | 16:07 |
| → kleisli_ joined | 16:08 |
| ← kleisli left | 16:10 |
| ← marslander left | 16:11 |
|
stats4647
| I have a remote branch and a local branch, with HEAD pointing to the remote branch and is detached -- how can I reattach the HEAD? | 16:13 |
| ← maestrojed left | 16:14 |
| ← tiin57 left | 16:14 |
|
no_gravity
| I am very unsure, but I would think checkout will do it? | 16:14 |
|
stats4647
| no_gravity: I was thinking that, too but not sure *what* I would checkout | 16:15 |
|
no_gravity
| Don't you tell git what to checkout? | 16:15 |
|
stats4647
| no_gravity: sorry, don't follow - are you saying just do "git checkout" without providing a "target" ? | 16:16 |
|
no_gravity
| No, I mean "git checkout thebranchyouwanttocheckout" | 16:17 |
| → hussam joined | 16:17 |
| → tiin57 joined | 16:17 |
|
stats4647
| no_gravity: ah ok, so would that be the "master" or the "remote branch" ? that's where i am getting confused | 16:17 |
|
no_gravity
| I have never heard about a concept called "remote branch". | 16:18 |
| orioles → wynn | 16:19 |
|
stats4647
| no_gravity: that may have been the wrong term, what I see is "master" (which I assume is my local master) and "origin/master" which sounds like a local copy of a remote master. Currently HEAD points to "origin/master" and my local "master" is behind. | 16:21 |
| ← gast0n left | 16:21 |
|
no_gravity
| Well, maybe it is the right term. I dunno :) | 16:21 |
| → Newami joined | 16:21 |
|
no_gravity
| What about "git checkout master"? | 16:21 |
|
stats4647
| no_gravity: can try that, but was first trying to understand what it would do | 16:22 |
|
no_gravity
| I would hope "git checkout master" would make HEAD point to the newest commit on your "local" branch called "master". | 16:23 |
|
| But I am not an expert when it comes to branches. Let alone "remote" branches. | 16:23 |
| ← Newami left | 16:23 |
|
no_gravity
| For example, I wonder why the directory .git/branches/ is empty in my repos. | 16:24 |
|
| I would have thought there should be files in there which point to certain commits. | 16:24 |
|
stats4647
| no_gravity: agree, but my local "master" is behind "origin/master" so I am wondering how to bring "master" in sync with "origin/master" | 16:24 |
|
no_gravity
| stats4647: pull? | 16:24 |
|
stats4647
| no_gravity: I think the pull was done (maybe fetch), so now the two branches need to "synced" locally | 16:25 |
|
no_gravity
| Personally, I only use "git pull --ff-only". | 16:26 |
|
stats4647
| did you ever create branches in your local repo? try "git branch -v" to see if you have branches | 16:26 |
| → dfee joined | 16:26 |
| → arcatech joined | 16:26 |
| → trinityblade joined | 16:27 |
|
no_gravity
| Yes, I have multiple branches. Yet, .git/branches/ is empty. | 16:27 |
|
stats4647
| no_gravity: maybe .git/branches is for remote branches only, complete guess | 16:28 |
|
no_gravity
| https://githowto.com/git_internals_git_directory does not even mention it. | 16:29 |
|
| stats4647: You have something in there? | 16:30 |
|
| Poking around the net, it might indeed be used for infos about remote stuff. | 16:32 |
|
stats4647
| no_gravity: i don't even have that directory ... | 16:33 |
|
no_gravity
| Yeah, I also read on some pages that it is "slightly deprecated". Whatever that means :) | 16:33 |
| → maestrojed joined | 16:33 |
| ← maestrojed left | 16:34 |
|
stats4647
| no_gravity: it may have been created with an older version of git and is no longer used, would be my guess | 16:35 |
|
no_gravity
| Could be. | 16:35 |
| → jrnieder joined | 16:37 |
| → gast0n joined | 16:38 |
| ← Technodrome left | 16:40 |
| ← Muimi left | 16:43 |
| ← tiin57 left | 16:44 |
| → geosmile joined | 16:44 |
| → maestrojed joined | 16:47 |
| → tiin57 joined | 16:48 |
| ← KnoP left | 16:48 |
| ← maestrojed left | 16:49 |
| → marslander joined | 16:54 |
| → saluri joined | 16:58 |
| → tubaman joined | 16:58 |
| ← no_gravity left | 17:00 |
| ← init left | 17:00 |
| → nvmd joined | 17:02 |
|
nvmd
| Does git have an operator that is the oppposite of ~ or ^ for forward instead of backward refs? | 17:04 |
|
rewt
| I doubt it; it would have to check all the commits to see which ones are children of the current one, and pick one (which one?)... for each commit you want to go forward | 17:07 |
|
| going backwards is easy; every commit has a record pointing directly to all of its parents | 17:08 |
| → dimi1947 joined | 17:10 |
| → maestrojed joined | 17:10 |
| ← tiin57 left | 17:14 |
|
ikke
| indeed | 17:17 |
| → Phylock joined | 17:18 |
| → tiin57 joined | 17:18 |
| → impermanence joined | 17:18 |
|
nvmd
| makes sense | 17:19 |
| → rgbmt joined | 17:24 |
|
rgbmt
| Hello, what is the way to know the last commit that was existed when I created the branch? | 17:24 |
|
| I mean, git branch -n new, I do git commits, but I want to know wich one was the last one before I create new commits. | 17:25 |
| → leeN joined | 17:27 |
| → ttl joined | 17:29 |
| ← dimi1947 left | 17:30 |
| → Technodrome joined | 17:31 |
| → Guest20 joined | 17:31 |
| ← mindCrime left | 17:31 |
|
stats4647
| rgbmt: someone mentioned this command which shows the branches graphically -- git log --oneline --graph --decorate --all | 17:31 |
| → Atlenohen joined | 17:32 |
|
squirrel
| i want to amend an old commit that's a part of many branches, is there an easy way to do this automatically? | 17:34 |
| ← ttl left | 17:34 |
| → dqx_ joined | 17:35 |
| ← Guest20 left | 17:36 |
| ← th_ left | 17:37 |
| → th_ joined | 17:37 |
| → cosimone_ joined | 17:39 |
| ← cosimone left | 17:39 |
| → cosimone joined | 17:40 |
|
nedbat
| squirrel: that sounds hard | 17:40 |
| → acetakwas joined | 17:42 |
| → nikivi joined | 17:42 |
|
squirrel
| :< | 17:43 |
| ← cosimone_ left | 17:44 |
| ← tiin57 left | 17:44 |
| ← txtsd left | 17:46 |
| → Guest20 joined | 17:46 |
| → txtsd joined | 17:46 |
| → tiin57 joined | 17:47 |
| → ttl joined | 17:49 |
| ← Guest20 left | 17:49 |
| ← Lucas_Gray left | 17:50 |
|
nedbat
| squirrel: are those all long-lived branches? They haven't been merged? | 17:52 |
| → eschwartz joined | 17:52 |
|
squirrel
| not too long-lived and no they haven't been merged | 17:53 |
|
| i'll just do it by hand i guess | 17:53 |
|
osse
| rgbmt: if you haven't created any commits on the new branch yet then the commit you're looking for is simply the one the branch is on right now | 17:53 |
| → init joined | 17:54 |
|
eschwartz
| git fetch origin <branchname> will fetch a branch + any tags it refers to, and define FETCH_HEAD. git fetch origin <tagname> does NOT fetch the tag (only the bare commit to FETCH_HEAD). I'm wondering if there's a way to guarantee the fetch regardless of the type of object you try to fetch... | 17:58 |
|
| I hacked this up: f() { git fetch origin +refs/tags/*$1:refs/tags/*$1 +refs/heads/*$1:refs/remotes/origin/*$1; }; f <ref> | 17:59 |
|
| but it doesn't set FETCH_HEAD, and the glob feels overaccepting. | 17:59 |
|
| any better ideas? | 17:59 |
| ← justache left | 18:00 |
| → justache joined | 18:01 |
| → causasui joined | 18:03 |
|
osse
| eschwartz: seems to me that git updates FETCH_HEAD even when it's not printed | 18:04 |
|
| related to the overaccepting part, those asterisks seem unecessary | 18:05 |
|
eschwartz
| ooooh, indeed it's there | 18:05 |
|
| the asterisks do seem to be necessary, as I need one *somewhere* or else you get errors when it cannot match an exact ref | 18:06 |
| ← bocaneri left | 18:06 |
|
eschwartz
| fatal: couldn't find remote ref refs/tags/<branchname> | 18:07 |
|
| I *think* the worst that can happen is failing to pull only one ref, thus wasting bandwidth and fetch time. | 18:08 |
|
rewt
| rgbmt, if there haven't been any merges of those branches to each other (directly or indirectly), have a look at man git merge-base | 18:10 |
|
gitinfo
| rgbmt: the git-merge-base manpage is available at https://gitirc.eu/git-merge-base.html | 18:10 |
|
rgbmt
| ok thanks! | 18:11 |
| ← Kaivo left | 18:12 |
| ← marslander left | 18:12 |
| ← cd left | 18:13 |
| ← tiin57 left | 18:14 |
| ← dqx_ left | 18:14 |
| ← Heirlung left | 18:15 |
| → Kaivo joined | 18:15 |
|
eschwartz
| So I think that fetch spec is adequate for https://github.com/mesonbuild/meson/pull/7723#discussion_r488869665 | 18:15 |
|
| thanks for being my rubber duck :D | 18:16 |
| → tiin57 joined | 18:18 |
| → dqx_ joined | 18:18 |
|
eschwartz
| actually, I can do one better... | 18:23 |
|
| git fetch --refmap '+refs/heads/*:refs/remotes/origin/*' --refmap '+refs/tags/*:refs/tags/*' origin <ref> | 18:23 |
|
osse
| eschwartz: what is the actual goal? | 18:26 |
|
eschwartz
| mesonbuild can download and build a git repo as a vendored dependency for you, with a user-configurable ref to checkout for building | 18:27 |
|
| cleverly, they did NOT design the config to specify whether it is a tag, commit, or branch | 18:27 |
|
| and they don't want to download the whole remote by default, because it might be big and slow | 18:28 |
| → saveNexit joined | 18:28 |
|
eschwartz
| ... they are considering to recant that, by doing 'git fetch origin && git fetch origin <ref>'. The latter just to get FETCH_HEAD | 18:28 |
|
| basically "get this ref but I dunno what it is. Don't get anything other than this ref though" | 18:29 |
|
osse
| git ls-remote maybe? | 18:30 |
|
squirrel
| i just did... $ git rebase --onto fix-branch 997830c8 feature-branch | 18:30 |
|
| according to docs, 997830c8 is "upstream" | 18:30 |
|
| what does this mean? | 18:30 |
| → impermanence56 joined | 18:30 |
| ← impermanence56 left | 18:31 |
| → bilb_ono joined | 18:31 |
| → impermanence44 joined | 18:31 |
| ← impermanence44 left | 18:31 |
|
squirrel
| i thought upstream means upstream repo | 18:31 |
| → impermanence40 joined | 18:31 |
|
eschwartz
| if you fetch it, then use git cat-file -t FETCH_HEAD, you can check what it is you just fetched. :D | 18:31 |
|
osse
| squirrel: in that case it just refers to something not part of your work | 18:32 |
|
| the term is used loosely | 18:32 |
| ← akem left | 18:32 |
|
squirrel
| but it's my local commit | 18:32 |
|
osse
| it's not part of what is rebased | 18:32 |
|
bilb_ono
| I have a branch Im working on. I want to merge the recent changes from master into my branch to keep it up to date. When I git pull origin master, it removes directories and files that are not in master. Does that sound right? | 18:32 |
|
osse
| squirrel: it is what is rebased against | 18:32 |
| → dionysus69 joined | 18:32 |
|
bilb_ono
| I don’t want that. I only want it to update the files that are exist with the new changes to master | 18:32 |
|
osse
| squirrel: it means the same as in this command: 'git rebase 997830c8' | 18:32 |
| ← feriman left | 18:33 |
| ← impermanence left | 18:33 |
|
eschwartz
| git fetch --refmap '+refs/heads/*:refs/remotes/origin/*' --refmap '+refs/tags/*:refs/tags/*' origin foobar; git cat-file -t FETCH_HEAD # tells you if foobar resolved as: tag) a tag, commit) a branch pointing at a commit | 18:33 |
|
| ^^ glorious | 18:34 |
|
squirrel
| osse: yeah.. | 18:35 |
|
rgbmt
| rewt: I think that this work well, hope that is corretc: | 18:35 |
|
squirrel
| still confusing | 18:35 |
|
rgbmt
| rewt: git rev-list --ancestry-path $(git merge-base origin/development PR111)..PR111 | 18:35 |
|
osse
| squirrel: they just call it upstream because in *most* causes you git rebase origin/master or git rebase myfork/whatever | 18:36 |
|
| but you can rebase on whatever you want | 18:36 |
|
| even your mom (kidding) | 18:36 |
|
eschwartz
| bilb_ono: "git pull origin master" will by default try to create a merge commit for your remote and local commits together. If you use pull --rebase (or the config option pull.rebase) it will, instead of merging, rebase your local commits on top of the remote. Either way, it will never delete your local uncommitted files. | 18:39 |
|
| bilb_ono: what, precisely, is being deleted? | 18:39 |
|
geosmile
| what is the best way to store a patch for a git repo - so that I can patch it continuously with my changes and test it out? | 18:39 |
|
| store "patches/patch_repo" and then apply that patch after a fresh clone, and test? | 18:39 |
|
eschwartz
| geosmile: why do you need fresh clones? | 18:40 |
|
| if you git pull --rebase, it will fetch remote updates, update to them, and re-apply the local patches on top | 18:40 |
|
| git-rebase(1) is powerful and amazing | 18:41 |
|
ikke
| It certainly is. | 18:41 |
|
| it can also be daunting | 18:41 |
|
squirrel
| i'm still completely lost about `--onto fix-branch 997830c8 feature-branch`. 997830c8 is upstream here, but if i do a git rebase -i upstream is something i want to have in my branch (i thought it was the "base" that i want to rebase my stuff onto, hence the name of the command) | 18:42 |
|
| but with `--onto` 997830c8 becomese something that i want to get rid of | 18:43 |
| ← ksynwa left | 18:43 |
|
osse
| squirrel: the --onto doesn't change what is rebased (ie. which commits), but it changes where they end up | 18:43 |
|
| 'git rebase --onto fix-branch 997830c8 feature-branch' = 'git checkout feature-branch && git rebase --onto=fix-branch 997830c8' | 18:44 |
| ← tiin57 left | 18:44 |
|
osse
| which takes the exact same commits 'git rebase 997830c8' would have rebased, but puts the on top of fix-branch instead | 18:44 |
|
squirrel
| right, i understand what feature-branch is ehre | 18:44 |
|
osse
| note my pedagogical use of = after --onto here | 18:45 |
|
eschwartz
| consider that rebase is, fundamentally, creating a list of "to be cherry-picked" commits (the commits between upstream and local). By default it checks out upstream and applies the full list of commits on top of it | 18:46 |
| → cuppajoeman joined | 18:46 |
|
squirrel
| but what does git rebase 997830c8 do? since 997830c8 is a part of feature-branch, would it do anything? | 18:46 |
|
eschwartz
| --onto means the list of to-be-applied commits just goes somewhere other than upstream | 18:47 |
|
osse
| squirrel: it does the same as 'git rebase foo' does, if foo was a branch that pointed to 997830c8 | 18:47 |
|
ikke
| squirrel: depends on whether 997830c8..HEAD has any commits, and if 997830c8 is reachable from HEAD | 18:47 |
| → KnoP joined | 18:47 |
|
eschwartz
| git rebase origin/mybranch # cherry-pick list is origin/mybranch -> HEAD, checkout origin/mybranch and apply cherry-pick list | 18:48 |
| → tiin57 joined | 18:48 |
|
eschwartz
| git rebase --onto otherbranch origin/mybranch # cherry-pick list is origin/mybranch -> HEAD, checkout otherbranch and apply cherry-pick list | 18:48 |
|
squirrel
| osse: but that does nothing? | 18:49 |
|
osse
| squirrel: that may be | 18:49 |
|
| squirrel: I don't see what you do | 18:49 |
|
squirrel
| ikke: yes and yes | 18:49 |
|
ikke
| squirrel: if 997830c8 is reachable from HEAD, there is nothing to do | 18:50 |
|
squirrel
| let me explain | 18:50 |
|
ikke
| (an interactive rebase would still be usefull, but a plain rebase would be a noop) | 18:50 |
|
geosmile
| eschwartz, This is a separate git repo by others | 18:51 |
|
| I am just trying to use a patch on it to use it in my code | 18:51 |
|
| eschwartz, also - I always start with a fresh clone - because the code is not checked into my code | 18:52 |
| → Lucas_Gray joined | 18:52 |
|
squirrel
| short story time https://bpa.st/raw/GUDA | 18:53 |
|
eschwartz
| geosmile: so e.g. your build script clones the repo and needs to patch it before using it? | 18:53 |
|
ikke
| squirrel: aha, you want to rebase multiple branches | 18:53 |
|
squirrel
| yes | 18:54 |
|
ikke
| Would you be able to provide a !situation? | 18:54 |
|
gitinfo
| Please post the url returned by `git log -n 20 --all --graph --format="%h %p %d %s" | curl -F text=@- https://upaste.de/` to give us an idea about what your situation is (increase the -n argument if your problem is more complex than 20 commits can explain) | 18:54 |
|
bilb_ono
| eschwartz: ok thanks. it looks like i do need git pull —rebase | 18:54 |
|
| eschwartz: an entire directory is gone | 18:54 |
|
eschwartz
| gone as in upstream removed it in a commit? | 18:55 |
|
bilb_ono
| when I git pull normally it has a bunch of messages like Removing models/retail/staging/iheartjane/staged/iheartjane_reservations_stg.sql | 18:55 |
|
| i don’t think anyone specifically git rm’d it | 18:55 |
|
| but it just wasnt in master | 18:55 |
|
| is there a way to check? | 18:56 |
|
eschwartz
| git log -p origin/master -- models/retail/staging/iheartjane/staged/iheartjane_reservations_stg.sql | 18:56 |
| ← ttl left | 18:56 |
|
init
| can someone point me to a decent guide for setting up a repository for working on OSS? | 18:56 |
|
eschwartz
| you'll see every change which the upstream branch performed on the file | 18:56 |
|
init
| I have two remotes, my fork and the upstream of a repository | 18:57 |
|
squirrel
| ikke: oh it's ok, that last command does work, it's just that i don't understand it | 18:57 |
|
init
| but when I fetch the upstream repository it automatically merges with my master | 18:58 |
|
squirrel
| in my head, `git rebase -r --onto fix 997830c foo` reads like "git, please, on branch foo, take commits (997830c...HEAD] and place them on top of fix" | 18:59 |
|
| would that be right? | 18:59 |
|
osse
| squirrel: I don't have the history, but it seems to me like it's a clever trick for dropping 997830c out of history' | 18:59 |
|
| if fix is in fact 997830c's parent | 18:59 |
|
squirrel
| oh wait | 18:59 |
|
ikke
| osse: in the output, you see that foo should be equal to 997830c | 19:00 |
| ← justache left | 19:00 |
|
squirrel
| i forgot the part where i fixed the commit: https://bpa.st/raw/CX3Q | 19:00 |
| → durham joined | 19:00 |
|
bilb_ono
| eschwartz: https://bpa.st/GJFA. so… I reverted a merge. which takes this away | 19:01 |
|
| oh is that what happened? | 19:01 |
| ← sudoforge left | 19:01 |
|
bilb_ono
| ok my merge probably had the git rm basically | 19:01 |
| → justache joined | 19:01 |
|
bilb_ono
| and now it rolled that on top of my stuff, so it removed it again | 19:01 |
|
| but on this branch, the file does exist, and I want it to exist | 19:03 |
|
squirrel
| oh, i found an article that goes like, `--onto` takes two parameters, `--onto new-base old-base` | 19:05 |
|
ikke
| not really | 19:05 |
|
| --onto takes 1 parameter | 19:05 |
|
| the 2nd is just the normal <base> parameter that rebase takes | 19:05 |
|
| ie, the order does not matter | 19:05 |
|
squirrel
| well this makes more sense | 19:05 |
|
ikke
| git rebase foo --onto bar | 19:05 |
|
| git rebase foo --onto bar <baz> | 19:06 |
|
osse
| That's why I always write it with a = ! | 19:06 |
|
| ====!!!!!!! | 19:06 |
|
squirrel
| i mean, pretending that it takes two parameters makes more sense than otherwise | 19:06 |
|
ikke
| normally, the first argument is used for 2 purposes: | 19:07 |
|
| to find the commits to rebase | 19:07 |
|
| and to provide a new base to rebase them onto | 19:07 |
|
squirrel
| yeah | 19:08 |
|
ikke
| with --onto, you explicitly provide the new base | 19:08 |
|
squirrel
| this kind of ambiguity doesn't help | 19:08 |
| ← dionysus69 left | 19:10 |
|
ikke
| It's made to fit common usecases | 19:10 |
|
| But it makes it perhaps a bit more confusing | 19:10 |
|
| The alternative would be to always specify the new base, but that would result in a lot of duplication | 19:11 |
|
| git rebase @{u} @{u} | 19:11 |
| ← tiin57 left | 19:14 |
| → tiin57 joined | 19:18 |
|
squirrel
| hm so `git rebase --onto=a b c` would be on branch c, take commits between b and c, and put them on top of a. and if `git rebase b c` it's the same as `git rebase --onto=b b c`. and if you are on c, you can just write `git rebase b` | 19:21 |
|
| sounds right? | 19:22 |
|
eschwartz
| yep | 19:22 |
|
squirrel
| wew i think i undestand it | 19:23 |
| → rafasc joined | 19:24 |
|
squirrel
| i'd change the full syntax to.. `git rebase a --old-base=b c` wonder if this would work | 19:25 |
|
nvmd
| they could add some syntactic suggar for it, that's for sure. | 19:26 |
|
| I don't use the rebase with 2 parameters, only with one or three | 19:26 |
| → stenno1 joined | 19:26 |
|
nvmd
| tbh, I don't know what the 2-param version does | 19:27 |
| ← Guest15472 left | 19:27 |
| → mra90 joined | 19:27 |
|
mra90
| what is the simplest method to check what is the remote location of currently checked out local branch? | 19:28 |
|
ikke
| note sure what you mean with that | 19:28 |
|
mra90
| I am checked out on a local branch right? | 19:28 |
|
eschwartz
| maybe you're using a detached head | 19:29 |
| ← maestrojed left | 19:29 |
|
eschwartz
| maybe you're on a local branch, but there is no remote branch | 19:29 |
| → Aki-lucky joined | 19:29 |
|
mra90
| how can I check (if so) what remote branch is it tracking? | 19:29 |
|
eschwartz
| if, however, you wish to know which remote branch the current local branch is tracking, @{u} refers to it | 19:29 |
|
ikke
| git rev-parse --abbrev-ref @{u} | 19:30 |
|
mra90
| seriously? | 19:30 |
|
| nothing simpler? | 19:30 |
|
ikke
| that is pretty simple... | 19:30 |
|
mra90
| or rather easier to memorize | 19:30 |
|
ikke
| You can make an alias for it | 19:30 |
|
mra90
| like git branch show remote | 19:30 |
|
| ikke, right | 19:30 |
|
| although, do you know alternate way to "git rev-parse --abbrev-ref @{u}"? | 19:31 |
|
rafasc
| git for-each-ref refs/heads/master --format='%(upstream:short)', is yet another way. And more flexible for other things. | 19:32 |
|
ikke
| git branch --vv shows it as well | 19:35 |
|
| but for all branches | 19:35 |
|
mra90
| ikke, yeah, much simpler! | 19:35 |
|
| thanks | 19:35 |
| ← mud left | 19:36 |
| ← Hello71 left | 19:37 |
| ← maxwilliamson left | 19:37 |
| → maxwilliamson joined | 19:38 |
| → Hello71 joined | 19:38 |
| ← supercoven left | 19:39 |
| moviuro_ → moviuro | 19:40 |
| → mud joined | 19:40 |
| ← tiin57 left | 19:44 |
| ← saluri left | 19:44 |
| → fstd_ joined | 19:47 |
| → tiin57 joined | 19:47 |
| ← mra90 left | 19:50 |
| ← fstd left | 19:50 |
| fstd_ → fstd | 19:50 |
| ← osse left | 19:52 |
| → wootehfoot joined | 19:54 |
| ← dfee left | 19:57 |
| → m0viefreak joined | 19:58 |
| → LuxuryMode joined | 19:59 |
| → maestrojed joined | 20:00 |
| → dfee joined | 20:01 |
| → jaziz joined | 20:06 |
| ← leeN left | 20:10 |
| → leeN joined | 20:12 |
| ← tiin57 left | 20:14 |
| → akem joined | 20:17 |
| → tiin57 joined | 20:18 |
| ← foul_owl_ left | 20:21 |
| ← perrier-jouet left | 20:30 |
| → perrier-jouet joined | 20:33 |
| → foul_owl_ joined | 20:35 |
| ← nessonic left | 20:36 |
| ← akem left | 20:38 |
| → feriman joined | 20:39 |
| ← tiin57 left | 20:44 |
|
geosmile
| eschwartz, yes | 20:44 |
|
| I guess I am looking for git clone + patch + build | 20:46 |
|
| so git format-patch + am is what i was looking at - is there a better way? | 20:46 |
| ← arcatech left | 20:46 |
| → tiin57 joined | 20:48 |
| → Nerium joined | 20:48 |
| → mirrorbird joined | 20:50 |
| ← maestrojed left | 20:54 |
| ← Thominus left | 20:54 |
| ← Nerium left | 20:55 |
| → Allos joined | 20:57 |
| ← POQDavid left | 20:59 |
| ← pikapika left | 20:59 |
| ← acetakwas left | 20:59 |
| ← nikivi left | 20:59 |
| ← cuppajoeman left | 20:59 |
|
Allos
| How can I configure Git to use multiple identities without SSH keys and with `credential.helper =manager` set? | 21:00 |
| → mindCrime joined | 21:01 |
|
Allos
| Currently, I use a `.gitconfig` with `includeif` statments to set the username based on the directory. Although, without SSH keys and with `credential.helper` set, GitHub stilll see the wrong username. | 21:01 |
| → nikivi joined | 21:01 |
|
Allos
| Are there any other options? | 21:01 |
| → pikapika joined | 21:02 |
| → acetakwas joined | 21:02 |
| → POQDavid joined | 21:03 |
|
rafasc
| Allos: are you setting the username as part of the credential config? | 21:04 |
|
Allos
| Yes | 21:04 |
|
| Oh no | 21:04 |
|
| Only in the `.gitconfig` | 21:04 |
|
rafasc
| because user.name is just for commits metadata | 21:04 |
|
Allos
| Where is the credential config? | 21:05 |
|
rafasc
| man git config | 21:05 |
|
gitinfo
| the git-config manpage is available at https://gitirc.eu/git-config.html | 21:05 |
|
rafasc
| check credential.username | 21:05 |
|
Allos
| Ahh, okay | 21:05 |
|
| I will try | 21:05 |
|
| thanks | 21:05 |
| ← cosimone left | 21:07 |
| → arcatech joined | 21:07 |
| → sudoforge joined | 21:08 |
| ← arcatech left | 21:12 |
| → Thominus joined | 21:12 |
| ← tiin57 left | 21:14 |
|
eschwartz
| geosmile: the only way to "store a git commit outside of a repo" is to use format-patch + am, yes. The alternative is forking the other repo and cloning that, where your patch is added as the latest commit and periodically updated with git pull --rebase | 21:14 |
| → arcatech joined | 21:14 |
|
rafasc
| and git bundles | 21:15 |
| ← stats4647 left | 21:15 |
| → stats4647 joined | 21:15 |
|
eschwartz
| that's just a fancy way of packing a repo into a file, and then git cloning/fetching the bundle | 21:16 |
| ← mirrorbird left | 21:16 |
| → tribly joined | 21:18 |
| → tiin57 joined | 21:18 |
| ← arcatech left | 21:18 |
| → mirrorbird joined | 21:19 |
| → mark4 joined | 21:19 |
|
mark4
| how can i get git diff to show me the ENTIRE FILE and show all the removed lines and added lines? | 21:19 |
|
| seeing - foo++; tells me i removed a line of code but i need contexgt | 21:20 |
| ← stats4647 left | 21:20 |
|
mark4
| i need to see the entire file | 21:20 |
| → osse joined | 21:20 |
|
rafasc
| you can use something absurd like: -U9999999 | 21:20 |
|
osse
| Why not -U10000000 | 21:21 |
|
mark4
| erm git diff -U9999999 foo.c ? | 21:21 |
|
osse
| without the "erm", but yes | 21:21 |
|
rafasc
| osse: I lost my 1 and 0 keys. | 21:22 |
|
osse
| I assume you write code in a language with a boolean type for a living | 21:23 |
| ← theoceaniscool left | 21:24 |
|
cbreak
| so... not K&R C :D | 21:24 |
| → stats4647 joined | 21:26 |
|
rafasc
| #DEFINE ay 1; #DEFINE nay 1; | 21:26 |
|
| er.. mistakes were made | 21:27 |
| → sgen joined | 21:28 |
| ← mark4 left | 21:30 |
| ← lagothrix left | 21:31 |
| ← Allos left | 21:32 |
| → lagothrix joined | 21:32 |
| ← justanotheruser left | 21:33 |
| → relipse joined | 21:35 |
|
osse
| I can't think of any language without a boolean type except C and the posix-like shell languages | 21:37 |
| ← EvanCarroll left | 21:38 |
| → prg318 joined | 21:38 |
|
rafasc
| osse: wiki mentions lisp | 21:40 |
|
| https://en.wikipedia.org/wiki/Boolean_data_type | 21:42 |
|
relipse
| I'm trying to find the diff between the last pull request and for some reason this is returning nothing: diff --name-only --diff-filter=ACMRTUXB "origin/master"..."HEAD" | 21:42 |
|
| what am I looking for? am I comparing the wrong thing? | 21:43 |
| ← tiin57 left | 21:44 |
| ← feriman left | 21:46 |
| ← thansen left | 21:46 |
|
rafasc
| relipse: origin/master...HEAD are changes since HEAD diverged from origin/master. Also why are you using the diff-filter like that? Isn't that equivalent of --diff-filter=d ? | 21:46 |
| → arcatech joined | 21:46 |
| → tiin57 joined | 21:47 |
| ← txtsd left | 21:48 |
|
relipse
| rafasc: so basically HEAD and origin/master are the same currently | 21:49 |
| ← Lucas_Gray left | 21:50 |
|
rafasc
| no, nothing changed since origin/master and HEAD diverged. git diff origin/master HEAD; would be the thing to check if they're different. | 21:51 |
| → Lucas_Gray joined | 21:51 |
|
rafasc
| or checking git show HEAD; and git show origin/master; and check if they are at the same commit. | 21:52 |
|
| as having an empty diff doesn't mean they're on the same commit. | 21:53 |
| → kupi joined | 21:53 |
| ← stats4647 left | 21:54 |
|
relipse
| ok so I found out that git diff HEAD origin/master has the diff I'm looking for (I think) what is the purpose of the ... | 21:59 |
|
rafasc
| imagine you branch from master at commit X. The both your branch and master receive commits. | 22:00 |
|
| master...HEAD; will be equivalent of diff X HEAD; that is, the commit where it diverged from master. | 22:00 |
|
| while HEAD origin/master does a direct comparison with master. | 22:01 |
| → g00s joined | 22:07 |
| → tcsilver joined | 22:10 |
|
tcsilver
| hi | 22:10 |
|
gitinfo
| tcsilver: hi! I'd like to automatically welcome you to #git, a place full of helpful gits. Got a question? Just ask it — chances are someone will answer fairly soon. The topic has links with more information about git and this channel. NB. it can't hurt to do a backup (type !backup for help) before trying things out, especially if they involve dangerous keywords such as --hard, clean, --force/-f, rm and so on. | 22:10 |
| → Betal joined | 22:10 |
|
tcsilver
| how to pull or download my github url ? | 22:11 |
| → impermanence joined | 22:12 |
| ← tiin57 left | 22:14 |
| ← impermanence40 left | 22:14 |
| ← tango_ left | 22:15 |
| → tango_ joined | 22:16 |
| → tiin57 joined | 22:17 |
|
rafasc
| tcsilver: it's not immediately clear what you mean by pull/download your github url. the word pull | 22:18 |
|
| has a specific meaning in git, and we usually do not use "download" for anything. | 22:19 |
|
| I am assuming you want to clone your repo, for that you would use: git clone <url>; | 22:20 |
| → maxwilli- joined | 22:22 |
| ← dfee left | 22:22 |
| ← maxwilliamson left | 22:24 |
|
joako
| How do I git push with rebase? | 22:29 |
| ← Phylock left | 22:29 |
| → dfee joined | 22:29 |
|
rafasc
| joako: easy, you don't. You push references, not operations. | 22:29 |
| ← leeN left | 22:29 |
|
rafasc
| you rebase locally and push the result back. | 22:30 |
|
joako
| Yea but the issue is all these commits and ustaged changed | 22:32 |
|
| No idea why git makes it such a hassle when there is no conflict | 22:32 |
| ← init left | 22:33 |
|
nedbat
| joako: does push -f work? | 22:35 |
|
joako
| Wouldn't that overwrite newer remote commits that I am missing | 22:36 |
|
rafasc
| yes. | 22:36 |
|
joako
| What I want to avoid is these nasty forced merges when there is no conflict. It should just automatically rebase when I try to push/pull/commit | 22:36 |
|
rafasc
| then use pull --rebase; push back | 22:36 |
|
joako
| And if there is some conflict ideally have a prompt path/file has a conflict 1) keep yours or 2) keep remote | 22:37 |
|
rafasc
| but rebase is not a tool to avoid conflicts. If you think that way, you're going to have problems. | 22:37 |
|
joako
| or 3) good luck git will mangle the file for you | 22:37 |
|
| I didnt say its a tool to avoid conflicts. I am saying it should be the default action instead of a nasty merge | 22:38 |
| → maestrojed joined | 22:38 |
|
rafasc
| it shouldn't. Especially because many new users don't even understand what a rebase is. | 22:38 |
|
| merges are much safer. | 22:39 |
|
| For conflict resolution both merge and rebase allow you to pass strategies via -X to resolve conflicts in favor or "ours" or "theirs". | 22:39 |
| ← wootehfoot left | 22:40 |
|
thiago
| it's happening again: | 22:41 |
|
| $ git status | 22:41 |
|
| fatal: HEAD does not point to a branch | 22:41 |
|
| I know it's not a branch. I detached. But why can't I get a status? | 22:41 |
|
rafasc
| thiago: what does cat .git/HEAD say? | 22:42 |
| ← trinityblade left | 22:44 |
|
thiago
| c13138375d1476e2a831d625aa43f86bcec61cfe | 22:44 |
| ← tiin57 left | 22:44 |
| ← sgen left | 22:44 |
| ← vngx left | 22:44 |
|
rafasc
| and you have that commit in your repo, I assume. | 22:44 |
|
thiago
| yes | 22:44 |
|
| it's the commit I checked out / switched to | 22:45 |
| → Xenguy joined | 22:45 |
| ← calcul0n_ left | 22:45 |
| → justanotheruser joined | 22:46 |
|
rafasc
| https://github.com/git/git/blob/master/remote.c#L1610; https://github.com/git/git/blob/master/remote.c#L1711; | 22:47 |
|
thiago
| https://hastebin.com/eniceqokan.sql for the actual commands | 22:47 |
|
rafasc
| I see that message in two places, both related to resolving "upstream"... | 22:47 |
| → tiin57 joined | 22:48 |
|
thiago
| sure, but I'm not trying to refer to upstream | 22:48 |
|
joako
| Is there any way to see what is in a commit? Because somehow its in the log but the change disappeared | 22:48 |
|
thiago
| the message comes from git status | 22:49 |
|
| joako: git show <commit> | 22:49 |
|
rafasc
| thiago: try --no-ahead-behind | 22:49 |
|
thiago
| rafasc: no change | 22:49 |
| ← dviola left | 22:49 |
|
rafasc
| thiago: it's weird, indeed. | 22:50 |
|
nedbat
| joako: you can change your settings so that --rebase is the default for pull | 22:50 |
| → vngx joined | 22:51 |
| → stats4647 joined | 22:51 |
|
rafasc
| thiago: And I can reproduce your issue. | 22:51 |
|
joako
| So the commit is there in the history but its like the push deleted the commits from the remote | 22:51 |
|
| I never did any push -f | 22:51 |
|
| nedbat, I think I did that now but can I make it autostash too? Not sure why it forces you to stash to rebase | 22:52 |
| ← Aelius left | 22:52 |
|
thiago
| rafasc: I can at least commit, if I do commit --no-status | 22:53 |
|
nedbat
| joako: https://cscheng.info/2017/01/26/git-tip-autostash-with-git-pull-rebase.html | 22:53 |
|
joako
| Ok but how can I get back the contents of the missing commit? | 22:54 |
| ← Case_Of left | 22:54 |
|
nedbat
| joako: we don't know the details of what happened, but "git reflog" shows the history of where your branch has pointed. | 22:54 |
|
thiago
| joako: push doesn't delete comntent in commits | 22:55 |
|
nedbat
| joako: your commit still exists, we just have to figure out how to reference it | 22:55 |
|
joako
| git log shows the commit but the actual contents of it are not present | 22:55 |
| → vdamewood joined | 22:56 |
|
nedbat
| joako: then you have another commit that removed those lines from the codee | 22:56 |
| → Case_Of joined | 22:56 |
| ← mescalinum left | 22:56 |
|
rafasc
| thiago: I think it's some weirdness with the reflog. | 22:57 |
|
| Probably the thing that tries to say "detached from whatever branch". | 22:58 |
| ← CodeSlingerPaul left | 22:58 |
| → Aelius joined | 22:58 |
|
rafasc
| if you nuke the reflog, git status will work again. But this is clearly buggy. I think you should report to the ML | 22:59 |
| ← cdown left | 22:59 |
|
joako
| I try to cherry-pick the missing commits but still the files do not appear | 23:00 |
| ← mirrorbird left | 23:01 |
| → cdown joined | 23:01 |
|
nedbat
| joako: have you looked at the changes in the commits? The changes are probably still in the commits. something else happeneed to the files. | 23:03 |
|
| joako: is this a public repo? | 23:03 |
|
rafasc
| thiago: if you want a workaround, resolve HEAD@{u} with rev-parse before you use it on --detach. | 23:04 |
|
joako
| Got it, issue is someone put the files in the wrong directory | 23:05 |
|
thiago
| rafasc: yes, I do. Interesting, I confirm. | 23:05 |
|
rafasc
| I'm pretty sure why this is happening, it's probably a consequence of status looking at the reflog trying to figure out what happened. But when you detach using HEAD@{u} the entry is not being resolved to a hash on the output of the reflog. | 23:06 |
| → mirrorbird joined | 23:06 |
| ← genevino left | 23:07 |
| ← Case_Of left | 23:07 |
|
rafasc
| So when status parses the reflog, it thinks HEAD{u} is a name of a branch, when it isn't. | 23:07 |
| → genevino joined | 23:07 |
|
thiago
| I see | 23:10 |
| → mowcat joined | 23:10 |
| ← archwizard left | 23:12 |
|
rafasc
| pretty sure I know why* | 23:13 |
| → Case_Of joined | 23:14 |
|
rafasc
| If you report to the list, send me the link or cc:me, curious if I'm right. | 23:14 |
| ← tiin57 left | 23:14 |
| ← genevino left | 23:14 |
| → genevino joined | 23:15 |
| ← heyitsrama left | 23:17 |
| → tiin57 joined | 23:18 |
|
joako
| git mv wont accept a directory? | 23:19 |
| ← LuxuryMode left | 23:20 |
| ← Case_Of left | 23:21 |
| → Case_Of joined | 23:21 |
| ← g00s left | 23:24 |
| ← foul_owl_ left | 23:25 |
| ← maestrojed left | 23:25 |
|
thiago
| joako: it will | 23:27 |
|
joako
| No... fatal: bad source | 23:32 |
| ← tcsilver left | 23:36 |
| → foul_owl_ joined | 23:38 |
| ← tiin57 left | 23:44 |
| → tiin57 joined | 23:47 |
| → EvanCarroll joined | 23:50 |
| ← Cabanossi left | 23:50 |
| → archwizard joined | 23:52 |
| ← Lucas_Gray left | 23:55 |
|
rewt
| joako, you could just mv it (without git), and then git add it... git mv is pretty much a shortcut for those 2 steps | 23:55 |
|
| but `git mv dirname` works for me | 23:56 |
|
| `git mv dirname newname` rather | 23:56 |
|
| I do get a "fatal: bad source" if "dirname" (^) doesn't exist | 23:57 |
| ← dfee left | 23:57 |
| → dfee joined | 23:59 |
|
rewt
| (and for that mentioned `git add`, you'd have to add both the original (to delete) and the new name (to add), and then `git status` shows the files in there as renamed as with `git mv`) | 23:59 |