IRCloggy #git 2020-09-15

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2020-09-15

g2anj left00:04
g2anj joined00:05
dqx_ left00:07
suzukisama joined00:08
Xenguy joined00:08
captain42 left00:08
captain42 joined00:12
Thominus joined00:13
cd joined00:14
yonder joined00:15
tiin57 left00:15
Olipro left00:15
saveNexit left00:17
saveNexit joined00:17
tiin57 joined00:18
adder joined00: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 start00: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 !parable00:20
adder great. thanks.00:21
cosimone left00:25
cosimone joined00:25
dfee left00:27
AnAverageHuman left00:28
UlrichH left00:30
cliluw joined00:31
yuljk left00:36
BackupBackupNick joined00:39
saveNexit left00:40
misuto2 joined00:40
saveNexit joined00:40
xSke_ joined00:41
Aki-lucky left00:41
misuto left00:41
xSke left00:41
chachasmooth left00:41
misuto2misuto00:41
chachasmooth_ joined00:41
xSke_xSke00:41
yuljk joined00:43
tiin57 left00:44
tiin57 joined00:47
maestrojed joined00:48
cd left00:51
BackupBackupNick left00:53
saveNexit left00:54
Olipro joined00:55
AnAverageHuman joined01:03
suzukisama left01:04
mindCrime left01:04
mindCrime joined01:05
gergap left01:10
crose left01:11
MaximusColourum joined01:12
MaximusColourum left01:12
haasn left01:12
haasn joined01:13
tiin57 left01:14
cuppajoeman left01:18
tiin57 joined01:18
jrnieder left01:23
clara97 joined01:25
bruce_lee left01:26
stats4647 joined01:27
F0rTex left01:27
F0rTex joined01:29
mat001 joined01:31
mat001_ left01:32
stats4647 left01:32
irc_user left01:38
vngx left01:39
tiin57 left01:44
tiin57 joined01:47
bkuhlmann joined01:47
akem_ joined01:50
akem left01:51
Gurkenglas left01:54
nvmd left02:00
justache left02:01
justache joined02:02
gast0n left02:04
kleisli_ left02: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 left02:14
lagothrixGuest669402:15
lagothrix joined02:16
chachasmooth_ left02:17
tiin57 joined02:18
chachasmooth joined02:18
Guest6694 left02:18
matelot left02:19
rafasc git config --remove-section includeIf."gitdir:~/Downloades/tutorial/"02:29
sudoforge left02:29
thomasross joined02:31
rafasc bkuhlmann: but I think both would work, if you use --unset, you would include .path there.02:32
iffraff left02: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 left02:35
bkuhlmann Quoting or unquoting doesn't seem to change behavior.02:36
init left02:39
nerdypepper left02:41
cbreak left02:42
kleisli_ joined02:42
cbreak joined02:43
tiin57 left02:44
tiin57 joined02:48
fatalhalt left02:59
justache left03:00
Cabanossi left03:00
justache joined03:01
Goplat joined03:03
fatalhalt joined03:04
thomasross left03:06
bkuhlmann left03:06
Cabanossi joined03:07
acetakwas joined03:08
drbean joined03:10
Codaraxis__ left03:13
sudoforge joined03:14
arcatech left03:15
tiin57 left03:15
tiin57 joined03:17
jwt joined03:19
maestrojed left03:29
Lucas_Gray joined03:31
inkbottle left03:34
inkbottle joined03:34
Muimi joined03:35
dfee joined03:38
mir100 left03:40
mir100 joined03:41
mindCrime left03:41
mir100 left03:41
mir100 joined03:42
jwt left03:44
tiin57 left03:44
mirrorbird left03:45
sgen joined03:46
mirrorbird joined03:47
tiin57 joined03:47
zumba_addict joined03: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 joined03:52
zumba_addict i'm trying `git log --all --grep='mypattern'` but it pauses03:55
it worked, found it03:56
def_jam joined03:57
Guest20 joined03:58
eblip left03:58
justache left04:00
stats4647 joined04:00
justache joined04:01
g00s_ joined04:02
inkbottle left04:03
inkbottle joined04:04
Eryn_1983_FL left04:04
g00s left04:04
justanotheruser left04:04
stats4647 left04:05
cim2091 joined04:05
cim209 left04:05
cim2091cim20904:05
Eryn_1983_FL joined04:06
random_yanek left04:06
th_ left04:07
th_ joined04:10
tiin57 left04:14
tiin57 joined04:17
random_yanek joined04:17
irc_user joined04:21
opal left04:22
clara97 left04:25
justanotheruser joined04:26
justache left04:28
justache joined04:29
misuto left04:30
misuto joined04:31
tiin57 left04:45
jwt left04:46
jwt joined04:46
sgen left04:47
tiin57 joined04:48
drbean left04:54
joako left04:56
Hello71 left04:57
Hello71 joined04:57
jwt left04:59
opal joined05:00
cosimone left05:00
cosimone joined05:00
causasui left05:01
drbean joined05:05
AnAverageHuman left05:06
joako joined05:07
magic_ninja left05:10
geosmile left05:12
jwt joined05:13
FH_thecat I can see diff of a particular file between two tags:05:13
git diff v4.9 v4.10 -- brd.c05:13
but how do I show the actual commit, where this change was made ?05:13
tiin57 left05:14
FH_thecat the above git diff command only shows me: index 0c76d4016eeb..3adc32a3153b 10064405:15
but not the full commit05:15
tiin57 joined05:17
magic_ninja joined05:29
arcatech joined05:36
arcatech left05:37
sudoforge left05:44
tiin57 left05:44
dfee left05:45
justanotheruser left05:47
tiin57 joined05:47
theoceaniscool joined05:51
kleisli_ left05:51
bocaneri joined05:52
j7k6 left05:54
jwt left05:57
jwt joined05:59
j7k6 joined06:00
konrados joined06:00
jwt left06:02
feriman joined06:02
clime joined06:10
tiin57 left06:14
FH_thecat left06:15
Lucas_Gray left06:15
dfee joined06:16
tiin57 joined06:17
rfuentess joined06:21
Shentino left06:28
Shentino joined06:29
Shentino left06:30
Shentino joined06:30
kleisli_ joined06:32
kent\n left06:34
kent\n joined06:36
thiago left06:36
pikapika joined06:44
tiin57 left06:44
tiin57 joined06:48
akem_akem06:53
kaartic joined06:53
drbean left06:53
cliluw left06:54
cliluw joined06:55
tgunr left06:56
mat001_ joined06:56
mat001 left06:58
Sonderblade left06:59
Sonderblade joined07:00
theoceaniscool left07:01
unluckyshrubbery left07:01
Goplat left07:03
onmeac left07:07
POQDavid left07:11
acetakwas left07:12
pikapika left07:12
pikapika joined07:13
pikapika left07:13
nikivi left07:13
Trieste left07:14
tiin57 left07:14
Trieste joined07:15
pikapika joined07:16
nikivi joined07:16
acetakwas joined07:17
tiin57 joined07:17
POQDavid joined07:18
Xenguy_ joined07:20
irc_user left07:21
FabioP joined07:21
kleisli__ joined07:21
mirrorbird left07:22
Xenguy left07:22
konrados left07:23
kleisli_ left07:23
FH_thecat joined07:23
yonder left07: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't07:25
it's a severe security issue if you could do that07:25
users have to opt-in to these things07:25
konrados joined07: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 commits07: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.c07: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 call07:27
hendry: for example, yes07:27
hendry ikke: I see, thank you07:28
ikke But please, make it really clear that it's happening. It would be very anoying if just building the project would install hooks07:29
donofrio_ left07:29
ikke looks at this nodejs package that clobbers your repo with hooks07:30
dynetrekk joined07: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 -- dir07:31
oxymoron93 joined07:31
z8z joined07:33
zumba_addict left07:36
Guest20_ joined07:38
Guest20 left07:39
vicfred left07:42
tiin57 left07:44
Sonderblade left07:46
wrobinso1 joined07:46
tiin57 joined07:47
wrobinson left07:48
akem_ joined07:51
akem left07:51
chiastre_ joined07:56
dynetrekk selckin ah, that obvious, didn't even realize. Thanks!07:56
vicfred joined07:56
chiastre left07:58
g00s_g00s07:58
inkbottle left08:01
zebrag joined08:01
dermoth_ joined08:02
stats4647 joined08:02
dermoth left08:02
dermoth_dermoth08:02
mikecmpbll joined08:03
stats4647 left08:07
Gurkenglas joined08:07
shabius_ joined08:08
sudoforge joined08:10
shabius left08:11
drbean joined08:14
tiin57 left08:14
tiin57 joined08: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 log08:19
geirha git log -p -- file08:20
akem_ left08: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 least08:22
FabioP i would rather see file content directly without jumping from commit to commit08:23
Xiti left08:25
drbean left08:29
KnoP joined08:29
akem joined08:34
supercoven joined08:35
unluckyshrubbery joined08:35
theoceaniscool joined08:42
feriman left08:43
tiin57 left08:44
Tobbi_ left08:46
feriman joined08:48
tiin57 joined08:48
Tobbi_ joined08:48
crose joined08:50
mirrorbird joined08:50
gergap joined08:58
magic_ninja left08:58
magic_ninja joined08:59
g00s left09:04
dionysus69 joined09:05
Nikita joined09:07
NikitaGuest7565009:07
nikivi left09:10
Guest75650nikivi09:10
tiin57 left09:14
Anticom joined09:17
tiin57 joined09:17
shtrb joined09:22
acetakwas left09:22
acetakwas joined09: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 joined09:25
kaartic left09:25
calcul0n joined09:29
Intelo joined09:34
Intelo How do I make a branch from a remote branch?09:34
$ git checkout -b uak-master uak/master09:34
fatal: 'uak/master' is not a commit and a branch 'uak-master' cannot be created from it09:34
uak/master is the remote branch. Uak is the origin09:35
Betal left09:38
FabioP left09:40
ikke Intelo: does git branch -r list it?09:40
osse ikke: uak or Uak ?09:40
no_gravity joined09:40
osse that was for Intelo09:40
Intelo checking09:41
xcm joined09: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 joined09:41
osse no_gravity: yes09:41
Intelo ikke: git branch -r does not list uak09:41
ikke: osse https://termbin.com/3ajs09:41
osse no_gravity: GIT_EXTERNAL_DIFF would work09:41
no_gravity osse: I would have to configure git to use a different diff program?09:42
ikke Intelo: git fetch09:42
no_gravity osse: Can I do that on the command line via -c ...?09:42
osse no_gravity: if you want it permanently, yes09:42
no_gravity osse: I just need it once.09:42
mir100 left09:42
Intelo ikke: I did git fetch but the git branch -r says same09: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 tmp209:43
ikke git fetch uak09:43
Intelo ikke: git remote says origin and uak09:44
ikke then ^^09:44
no_gravity osse: Hmm.. I don't have prettyprint09:44
Intelo ikke: do I have to fetch for each origin?09:44
tiin57 left09:44
ikke If you don't specify the remote, git uses tracking information to determine the remote to fetch from09: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-priting09:45
ikke -r only shows remote tracking branches09:45
osse I was guessing you had something handy09:45
ikke -a shows both local and remote tracking branches09:45
Intelo -a shows all?09:45
ok09:45
thanks. trying09: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 joined09: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 joined09:48
no_gravity linux_daemon: A new instance of what?09:48
linux_daemon bash.exe09: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 variable09:51
ikke I think you can do some things with PS109:51
:)09:51
osse configuring bash.exe is in most ways the same as on any OS09:51
.bashrc etc.09:51
ikke http://bashrcgenerator.com/09:52
~/.bashrc09: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 windows09:52
ikke source ~/.bashrc09:53
linux_daemon on windows machine?09:53
ikke: i meant for windows machine, not ubuntu09:53
hussam left09:53
no_gravity left09:53
ikke linux_daemon: would work exactly the same, in the terminal09:54
that file is read everytime you start a new terminal09:54
there is nothing you have to do to reload it09:54
with source, you can read it in an already existing terminal09:54
linux_daemon ok, then, i changed this line: PS1="$ " to: PS1="\t $ " but when i restarted, no luck, still no timestamp09: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 empty09:58
it gives me a path of: /c/Users/user/.bashsrc09:59
geirha it has an s too many09:59
FabioP joined09:59
linux_daemon ah09:59
ok, bashrc, but still empty09: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 file09:59
tejr left10:00
linux_daemon how to add the timestamp now? should i do: PS1="\t $ " only?10:00
tejr joined10:00
geirha try it and see10:01
linux_daemon it freaking works :D10:02
thanks thanks :D10:02
shtrb linux_daemon, you need to restart the instance for it to be stored and propely set10:02
linux_daemon on windows, just restarting the bash.exe is enough?10:03
shtrb yes10:04
ofc , other running instances will not have your changes (because the file had not been loaded)10:04
mikecmpbll left10: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 yet10: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.exe10:11
linux_daemon will do!10:11
kaartic joined10:13
tiin57 left10:14
skyline199476 joined10:16
tiin57 joined10:18
akem left10:18
bruce_lee joined10:21
calcul0n_ joined10:22
calcul0n left10:24
aw1 joined10:24
mikecmpbll joined10:28
skyline199476 left10:35
vngx joined10:35
kleisli joined10:38
kaartic left10:38
mikecmpbll left10:39
kleisli__ left10:40
jaziz left10:42
tiin57 left10:44
nikivi left10:45
acetakwas left10:45
nikivi joined10:45
pikapika left10:45
POQDavid left10:45
pikapika joined10:46
nikivi left10:46
pikapika left10:47
tiin57 joined10:47
mindCrime joined10:48
pikapika joined10:49
mirrorbird left10:50
POQDavid joined10:50
nikivi joined10:51
acetakwas joined10:52
akem joined10:55
Guest20_ left10:58
Guest20 joined11:02
tejr left11:02
tejr joined11:02
kaartic joined11:09
mindCrime left11:12
tiin57 left11:14
APic joined11:16
tiin57 joined11:17
dfee left11:18
mirrorbird joined11:27
cdown left11:28
cdown joined11:30
mirrorbird left11:32
FabioP left11:32
aw1 left11:33
mindCrime joined11:33
milkt left11:34
aw1 joined11:34
milkt joined11: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 -L11:35
ikke You'd naively assume it does not have to trace every line of a file11:36
tgunr left11:36
osse I am mistaken. It does offer that. It's just that the Rust bindings down11:37
don't11:37
tiin57 left11:44
vdamewood left11:45
fcserr left11:47
tiin57 joined11:47
vdamewood joined11:47
Intelo whats the lightest selfthosted solution alternative to github?11:48
ikke gogs?11:48
/gitea11:48
selckin do you want issues & stuff or just repos11:48
Intelo gitea?11:48
selckin: just repos11: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 idea11:49
Intelo selckin: ?11:49
ikke I think one forked from the other11:49
selckin gitolite used to be the thing11:49
Intelo selckin: which one does not have issues but only repos?11:49
ikke gitolite + cgit if you don't need issues / pull requests11:50
Intelo ikke: I just need repos and PRs11:50
ikke Then either gogs or gitea11:50
Intelo ok.11:50
nikivi left11:50
acetakwas left11:50
pikapika left11:51
POQDavid left11:51
nikivi joined11:51
nikivi left11:51
nikivi joined11:55
acetakwas joined11:55
pikapika joined11:55
POQDavid joined11:55
Kaivo left11:58
maxwilliamson left11:59
maxwilliamson joined11:59
Kaivo joined12:00
h3ck left12:00
drbean joined12:01
kleisli left12:02
ws2k3 how can i localy remove a file from git but dont remove it upstream?12:02
kleisli joined12:03
selckin don't think you can (in a sane way)12:03
stats4647 joined12:04
stats4647 left12:08
Guest20 left12:13
Lucas_Gray left12:14
tiin57 left12:14
Lucas_Gray joined12:16
berndj left12:16
berndj joined12:17
tiin57 joined12:18
linux_daemon left12:20
crose left12:24
nikivi left12:25
pikapika left12:25
nikivi joined12:25
pikapika joined12:25
sgen joined12:26
acetakwas left12:27
nikivi left12:27
nikivi joined12:27
acetakwas joined12:27
z8z left12:30
mat001_ left12:30
epoll left12:32
epoll joined12:33
Gurkenglas left12:41
tiin57 left12:44
tiin57 joined12:48
Xenguy_ left12:56
donofrio joined13:02
init joined13:05
sudoforge left13:07
mescalinum joined13:13
tiin57 left13:14
tiin57 joined13:18
Guest20 joined13:22
vdamewood left13:23
swimmer left13:24
Guest20 left13:28
swimmer joined13:29
sgen left13:30
acetakwas left13:38
pikapika left13:38
nikivi left13:39
acetakwas joined13:39
POQDavid left13:39
acetakwas left13:39
nikivi joined13:40
mns joined13:40
acetakwas joined13:40
acetakwas left13:40
POQDavid joined13:40
nikivi left13:40
POQDavid left13:41
nikivi joined13:41
CodeSlingerPaul joined13:41
akem left13:41
POQDavid joined13:41
nikivi left13:42
pikapika joined13:42
shtrb left13:42
pikapika left13:42
pikapika joined13:43
tiin57 left13:44
higherorderbit joined13:45
oxymoron93 left13:47
mns left13:47
tiin57 joined13:47
maestrojed joined13:49
konrados left13:49
irc_user joined13:50
POQDavid left13:50
konrados joined13:50
rfuentess__ joined13:51
POQDavid joined13:51
rfuentess left13:53
theoceaniscool left13:53
adder left13:53
metametapod_ joined13:57
LasseVK_ joined13:57
mricon_ joined13:57
jetpack_joe_ joined13:57
heinrich5991_ joined13:57
jkhsjdhj- joined13:57
ghormoon_ joined13:57
BlueShark_ joined13:57
rfv_ joined13:57
jakesyl_ joined13:57
moviuro_ joined13:57
graphicsv_ joined13:57
coffeejunk_ joined13:57
themill_ joined13:57
n-st- joined13:58
gruetze_ joined13:58
orioles joined13:58
SrPx_ joined13:58
Lea2 joined13:58
carlesc_ joined13:59
Nickeeh joined13:59
netwoodle joined13:59
ixian8 joined13:59
Gurkenglas joined14:00
prit_ joined14:00
carlesc left14:00
SrPx left14:00
prit left14:00
jakesyl left14:00
BlueShark left14:00
LasseVK left14:00
graphicsv left14:00
morguldir left14:00
jetpack_joe left14:00
heinrich5991_heinrich599114:00
batrick left14:00
metametapod left14:00
kashike left14:00
leah2 left14:00
mricon left14:00
wynn left14:00
lambda left14:00
geirha left14:00
coffeejunk left14:00
deepy left14:00
jkhsjdhjs left14:00
Nothing4You left14:00
Nickeeh_ left14:00
jkhsjdhj-jkhsjdhjs14:00
carlesc_carlesc14:00
netwoodlenoodle14:00
prit_prit14:00
LasseVK_LasseVK14:00
n-st-n-st14:00
themill_themill14:00
Seveas_ joined14:00
metametapod_metametapod14:00
mricon_mricon14:00
coffeejunk_coffeejunk14:00
bingos joined14:00
graphicsv_graphicsv14:00
BlueShark_BlueShark14:00
jetpack_joe_jetpack_joe14:00
jakesyl_jakesyl14:00
rfv_rfv14:00
SrPx_SrPx14:00
theoceaniscool joined14:02
drbean left14:03
sstutz joined14:03
robertparkerx joined14:03
uidzer0 joined14:03
aib joined14:03
mjh4386 left14:03
mjh4386 joined14:05
steven left14:06
batrick joined14:06
morguldir joined14:06
Nothing4You joined14:06
WakiMiko joined14:06
deepy joined14:07
kashike joined14:07
no_maam joined14:07
EvilJStoker joined14:07
geirha joined14:08
leah2 joined14:08
feriman left14:08
Kaivo left14:09
lambda joined14:10
konrados left14:11
Kaivo joined14:12
feriman joined14:13
pulec joined14:13
tiin57 left14:14
tiin57 joined14:18
sweatsuit left14:18
sweatsuit joined14:22
trinityblade joined14:23
thiago joined14:23
gast0n joined14:25
ninjin_ left14:29
ninjin_ joined14:30
diogenese left14:31
pikapika left14:31
diogenese joined14:31
POQDavid left14:31
pikapika joined14:33
pikapika left14:33
POQDavid joined14:33
aw1 left14:33
POQDavid left14:34
eb0t joined14:34
pikapika joined14:34
POQDavid joined14:35
sweatsuit left14:36
gruetze_gruetzkopf14:37
maxwilliamson left14:38
kaartic left14:38
maxwilliamson joined14:38
rfuentess__rfuentess14:40
lucasb joined14:41
tiin57 left14:44
sweatsuit joined14:45
stats4647 joined14:45
justanotheruser joined14:47
thomasross joined14:47
tiin57 joined14:47
sweatsuit left14:48
sweatsuit joined14: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 joined14:52
ws2k3 CrtxReavr: thxx!14:52
crose joined14:52
ksynwa for git format-patch, how can I make it so that the file names don't have `a/` or `b/` before them14:52
nevermind it's the --no-prefix flag14:54
sweatsuit left14:59
dionysus69 left15:01
akem joined15:01
cd joined15:01
lmat joined15:02
lmat When I git log --decorate; why do I not see things like origin/3.0 (tag)?15:03
sudoforge joined15:05
nedbat lmat: do you see the 3.0 tag?15:08
davidfetter hi15: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 left15:14
tiin57 joined15:18
Jookia davidfetter: you could use git log --stat to see commit change histograms15:23
davidfetter thanks, Jookia :)15:24
Lea2Learath215:24
Anticom left15:25
flowinho joined15:28
stats4647 left15:29
stats4647 joined15:29
h3ck joined15:34
infl00p left15:38
infl00p joined15:38
trinityblade left15:39
tiin57 left15:44
tiin57 joined15:48
marslander joined15:50
rfuentess left15: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 ? TIA15:53
1dc96cf (HEAD, origin/master, origin/HEAD) [message2]15:53
fe78fae (master) [message1]15:53
Hello71 !lol15:56
gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all15:56
RandomGuy90 left15:58
RandomGuy90 joined15:59
no_gravity joined15: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 joined16: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 sensitivity16:07
no_gravity I see.16:07
kleisli_ joined16:08
kleisli left16:10
marslander left16: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 left16:14
tiin57 left16: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 checkout16: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 joined16:17
tiin57 joined16:17
stats4647 no_gravity: ah ok, so would that be the "master" or the "remote branch" ? that's where i am getting confused16:17
no_gravity I have never heard about a concept called "remote branch".16:18
orioleswynn16: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 left16:21
no_gravity Well, maybe it is the right term. I dunno :)16:21
Newami joined16: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 do16: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 left16: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" locally16: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 branches16:26
dfee joined16:26
arcatech joined16:26
trinityblade joined16: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 guess16: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 joined16:33
maestrojed left16:34
stats4647 no_gravity: it may have been created with an older version of git and is no longer used, would be my guess16:35
no_gravity Could be.16:35
jrnieder joined16:37
gast0n joined16:38
Technodrome left16:40
Muimi left16:43
tiin57 left16:44
geosmile joined16:44
maestrojed joined16:47
tiin57 joined16:48
KnoP left16:48
maestrojed left16:49
marslander joined16:54
saluri joined16:58
tubaman joined16:58
no_gravity left17:00
init left17:00
nvmd joined17: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 forward17:07
going backwards is easy; every commit has a record pointing directly to all of its parents17:08
dimi1947 joined17:10
maestrojed joined17:10
tiin57 left17:14
ikke indeed17:17
Phylock joined17:18
tiin57 joined17:18
impermanence joined17:18
nvmd makes sense17:19
rgbmt joined17: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 joined17:27
ttl joined17:29
dimi1947 left17:30
Technodrome joined17:31
Guest20 joined17:31
mindCrime left17:31
stats4647 rgbmt: someone mentioned this command which shows the branches graphically -- git log --oneline --graph --decorate --all17:31
Atlenohen joined17: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 left17:34
dqx_ joined17:35
Guest20 left17:36
th_ left17:37
th_ joined17:37
cosimone_ joined17:39
cosimone left17:39
cosimone joined17:40
nedbat squirrel: that sounds hard17:40
acetakwas joined17:42
nikivi joined17:42
squirrel :<17:43
cosimone_ left17:44
tiin57 left17:44
txtsd left17:46
Guest20 joined17:46
txtsd joined17:46
tiin57 joined17:47
ttl joined17:49
Guest20 left17:49
Lucas_Gray left17:50
nedbat squirrel: are those all long-lived branches? They haven't been merged?17:52
eschwartz joined17:52
squirrel not too long-lived and no they haven't been merged17:53
i'll just do it by hand i guess17: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 now17:53
init joined17: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 left18:00
justache joined18:01
causasui joined18:03
osse eschwartz: seems to me that git updates FETCH_HEAD even when it's not printed18:04
related to the overaccepting part, those asterisks seem unecessary18:05
eschwartz ooooh, indeed it's there18:05
the asterisks do seem to be necessary, as I need one *somewhere* or else you get errors when it cannot match an exact ref18:06
bocaneri left18: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-base18:10
gitinfo rgbmt: the git-merge-base manpage is available at https://gitirc.eu/git-merge-base.html18:10
rgbmt ok thanks!18:11
Kaivo left18:12
marslander left18:12
cd left18:13
tiin57 left18:14
dqx_ left18:14
Heirlung left18:15
Kaivo joined18:15
eschwartz So I think that fetch spec is adequate for https://github.com/mesonbuild/meson/pull/7723#discussion_r48886966518:15
thanks for being my rubber duck :D18:16
tiin57 joined18:18
dqx_ joined18: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 building18:27
cleverly, they did NOT design the config to specify whether it is a tag, commit, or branch18:27
and they don't want to download the whole remote by default, because it might be big and slow18:28
saveNexit joined18:28
eschwartz ... they are considering to recant that, by doing 'git fetch origin && git fetch origin <ref>'. The latter just to get FETCH_HEAD18: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-branch18:30
according to docs, 997830c8 is "upstream"18:30
what does this mean?18:30
impermanence56 joined18:30
impermanence56 left18:31
bilb_ono joined18:31
impermanence44 joined18:31
impermanence44 left18:31
squirrel i thought upstream means upstream repo18:31
impermanence40 joined18:31
eschwartz if you fetch it, then use git cat-file -t FETCH_HEAD, you can check what it is you just fetched. :D18:31
osse squirrel: in that case it just refers to something not part of your work18:32
the term is used loosely18:32
akem left18:32
squirrel but it's my local commit18:32
osse it's not part of what is rebased18: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 against18:32
dionysus69 joined18:32
bilb_ono I don’t want that. I only want it to update the files that are exist with the new changes to master18:32
osse squirrel: it means the same as in this command: 'git rebase 997830c8'18:32
feriman left18:33
impermanence left18: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 commit18:33
^^ glorious18:34
squirrel osse: yeah..18:35
rgbmt rewt: I think that this work well, hope that is corretc:18:35
squirrel still confusing18:35
rgbmt rewt: git rev-list --ancestry-path $(git merge-base origin/development PR111)..PR11118:35
osse squirrel: they just call it upstream because in *most* causes you git rebase origin/master or git rebase myfork/whatever18:36
but you can rebase on whatever you want18: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 top18:40
git-rebase(1) is powerful and amazing18:41
ikke It certainly is.18:41
it can also be daunting18: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 of18:43
ksynwa left18:43
osse squirrel: the --onto doesn't change what is rebased (ie. which commits), but it changes where they end up18:43
'git rebase --onto fix-branch 997830c8 feature-branch' = 'git checkout feature-branch && git rebase --onto=fix-branch 997830c8'18:44
tiin57 left18:44
osse which takes the exact same commits 'git rebase 997830c8' would have rebased, but puts the on top of fix-branch instead18:44
squirrel right, i understand what feature-branch is ehre18:44
osse note my pedagogical use of = after --onto here18: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 it18:46
cuppajoeman joined18: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 upstream18:47
osse squirrel: it does the same as 'git rebase foo' does, if foo was a branch that pointed to 997830c818:47
ikke squirrel: depends on whether 997830c8..HEAD has any commits, and if 997830c8 is reachable from HEAD18:47
KnoP joined18:47
eschwartz git rebase origin/mybranch # cherry-pick list is origin/mybranch -> HEAD, checkout origin/mybranch and apply cherry-pick list18:48
tiin57 joined18:48
eschwartz git rebase --onto otherbranch origin/mybranch # cherry-pick list is origin/mybranch -> HEAD, checkout otherbranch and apply cherry-pick list18:48
squirrel osse: but that does nothing?18:49
osse squirrel: that may be18:49
squirrel: I don't see what you do18:49
squirrel ikke: yes and yes18:49
ikke squirrel: if 997830c8 is reachable from HEAD, there is nothing to do18:50
squirrel let me explain18: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 others18:51
I am just trying to use a patch on it to use it in my code18:51
eschwartz, also - I always start with a fresh clone - because the code is not checked into my code18:52
Lucas_Gray joined18:52
squirrel short story time https://bpa.st/raw/GUDA18: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 branches18:53
squirrel yes18: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 —rebase18:54
eschwartz: an entire directory is gone18: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.sql18:55
i don’t think anyone specifically git rm’d it18:55
but it just wasnt in master18:55
is there a way to check?18:56
eschwartz git log -p origin/master -- models/retail/staging/iheartjane/staged/iheartjane_reservations_stg.sql18:56
ttl left18: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 file18:56
init I have two remotes, my fork and the upstream of a repository18:57
squirrel ikke: oh it's ok, that last command does work, it's just that i don't understand it18:57
init but when I fetch the upstream repository it automatically merges with my master18: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 parent18:59
squirrel oh wait18:59
ikke osse: in the output, you see that foo should be equal to 997830c19:00
justache left19:00
squirrel i forgot the part where i fixed the commit: https://bpa.st/raw/CX3Q19:00
durham joined19:00
bilb_ono eschwartz: https://bpa.st/GJFA. so… I reverted a merge. which takes this away19:01
oh is that what happened?19:01
sudoforge left19:01
bilb_ono ok my merge probably had the git rm basically19:01
justache joined19:01
bilb_ono and now it rolled that on top of my stuff, so it removed it again19:01
but on this branch, the file does exist, and I want it to exist19:03
squirrel oh, i found an article that goes like, `--onto` takes two parameters, `--onto new-base old-base`19:05
ikke not really19:05
--onto takes 1 parameter19:05
the 2nd is just the normal <base> parameter that rebase takes19:05
ie, the order does not matter19:05
squirrel well this makes more sense19:05
ikke git rebase foo --onto bar19: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 otherwise19:06
ikke normally, the first argument is used for 2 purposes:19:07
to find the commits to rebase19:07
and to provide a new base to rebase them onto19:07
squirrel yeah19:08
ikke with --onto, you explicitly provide the new base19:08
squirrel this kind of ambiguity doesn't help19:08
dionysus69 left19:10
ikke It's made to fit common usecases19:10
But it makes it perhaps a bit more confusing19:10
The alternative would be to always specify the new base, but that would result in a lot of duplication19:11
git rebase @{u} @{u}19:11
tiin57 left19:14
tiin57 joined19: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 yep19:22
squirrel wew i think i undestand it19:23
rafasc joined19:24
squirrel i'd change the full syntax to.. `git rebase a --old-base=b c` wonder if this would work19: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 three19:26
stenno1 joined19:26
nvmd tbh, I don't know what the 2-param version does19:27
Guest15472 left19:27
mra90 joined19: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 that19:28
mra90 I am checked out on a local branch right?19:28
eschwartz maybe you're using a detached head19:29
maestrojed left19:29
eschwartz maybe you're on a local branch, but there is no remote branch19:29
Aki-lucky joined19: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 it19: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 memorize19:30
ikke You can make an alias for it19:30
mra90 like git branch show remote19:30
ikke, right19: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 well19:35
but for all branches19:35
mra90 ikke, yeah, much simpler!19:35
thanks19:35
mud left19:36
Hello71 left19:37
maxwilliamson left19:37
maxwilliamson joined19:38
Hello71 joined19:38
supercoven left19:39
moviuro_moviuro19:40
mud joined19:40
tiin57 left19:44
saluri left19:44
fstd_ joined19:47
tiin57 joined19:47
mra90 left19:50
fstd left19:50
fstd_fstd19:50
osse left19:52
wootehfoot joined19:54
dfee left19:57
m0viefreak joined19:58
LuxuryMode joined19:59
maestrojed joined20:00
dfee joined20:01
jaziz joined20:06
leeN left20:10
leeN joined20:12
tiin57 left20:14
akem joined20:17
tiin57 joined20:18
foul_owl_ left20:21
perrier-jouet left20:30
perrier-jouet joined20:33
foul_owl_ joined20:35
nessonic left20:36
akem left20:38
feriman joined20:39
tiin57 left20:44
geosmile eschwartz, yes20:44
I guess I am looking for git clone + patch + build20:46
so git format-patch + am is what i was looking at - is there a better way?20:46
arcatech left20:46
tiin57 joined20:48
Nerium joined20:48
mirrorbird joined20:50
maestrojed left20:54
Thominus left20:54
Nerium left20:55
Allos joined20:57
POQDavid left20:59
pikapika left20:59
acetakwas left20:59
nikivi left20:59
cuppajoeman left20:59
Allos How can I configure Git to use multiple identities without SSH keys and with `credential.helper =manager` set?21:00
mindCrime joined21: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 joined21:01
Allos Are there any other options?21:01
pikapika joined21:02
acetakwas joined21:02
POQDavid joined21:03
rafasc Allos: are you setting the username as part of the credential config?21:04
Allos Yes21:04
Oh no21:04
Only in the `.gitconfig`21:04
rafasc because user.name is just for commits metadata21:04
Allos Where is the credential config?21:05
rafasc man git config21:05
gitinfo the git-config manpage is available at https://gitirc.eu/git-config.html21:05
rafasc check credential.username21:05
Allos Ahh, okay21:05
I will try21:05
thanks21:05
cosimone left21:07
arcatech joined21:07
sudoforge joined21:08
arcatech left21:12
Thominus joined21:12
tiin57 left21: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 --rebase21:14
arcatech joined21:14
rafasc and git bundles21:15
stats4647 left21:15
stats4647 joined21:15
eschwartz that's just a fancy way of packing a repo into a file, and then git cloning/fetching the bundle21:16
mirrorbird left21:16
tribly joined21:18
tiin57 joined21:18
arcatech left21:18
mirrorbird joined21:19
mark4 joined21: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 contexgt21:20
stats4647 left21:20
mark4 i need to see the entire file21:20
osse joined21:20
rafasc you can use something absurd like: -U999999921:20
osse Why not -U1000000021:21
mark4 erm git diff -U9999999 foo.c ?21:21
osse without the "erm", but yes21: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 living21:23
theoceaniscool left21:24
cbreak so... not K&R C :D21:24
stats4647 joined21:26
rafasc #DEFINE ay 1; #DEFINE nay 1;21:26
er.. mistakes were made21:27
sgen joined21:28
mark4 left21:30
lagothrix left21:31
Allos left21:32
lagothrix joined21:32
justanotheruser left21:33
relipse joined21:35
osse I can't think of any language without a boolean type except C and the posix-like shell languages21:37
EvanCarroll left21:38
prg318 joined21:38
rafasc osse: wiki mentions lisp21:40
https://en.wikipedia.org/wiki/Boolean_data_type21: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 left21:44
feriman left21:46
thansen left21: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 joined21:46
tiin57 joined21:47
txtsd left21:48
relipse rafasc: so basically HEAD and origin/master are the same currently21:49
Lucas_Gray left21: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 joined21: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 joined21:53
stats4647 left21: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 joined22:07
tcsilver joined22:10
tcsilver hi22: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 joined22:10
tcsilver how to pull or download my github url ?22:11
impermanence joined22:12
tiin57 left22:14
impermanence40 left22:14
tango_ left22:15
tango_ joined22:16
tiin57 joined22:17
rafasc tcsilver: it's not immediately clear what you mean by pull/download your github url. the word pull22: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- joined22:22
dfee left22:22
maxwilliamson left22:24
joako How do I git push with rebase?22:29
Phylock left22:29
dfee joined22:29
rafasc joako: easy, you don't. You push references, not operations.22:29
leeN left22:29
rafasc you rebase locally and push the result back.22:30
joako Yea but the issue is all these commits and ustaged changed22:32
No idea why git makes it such a hassle when there is no conflict22:32
init left22:33
nedbat joako: does push -f work?22:35
joako Wouldn't that overwrite newer remote commits that I am missing22: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/commit22:36
rafasc then use pull --rebase; push back22:36
joako And if there is some conflict ideally have a prompt path/file has a conflict 1) keep yours or 2) keep remote22: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 you22:37
I didnt say its a tool to avoid conflicts. I am saying it should be the default action instead of a nasty merge22:38
maestrojed joined22: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 left22:40
thiago it's happening again:22:41
$ git status22:41
fatal: HEAD does not point to a branch22: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 left22:44
thiago c13138375d1476e2a831d625aa43f86bcec61cfe22:44
tiin57 left22:44
sgen left22:44
vngx left22:44
rafasc and you have that commit in your repo, I assume.22:44
thiago yes22:44
it's the commit I checked out / switched to22:45
Xenguy joined22:45
calcul0n_ left22:45
justanotheruser joined22: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 commands22:47
rafasc I see that message in two places, both related to resolving "upstream"...22:47
tiin57 joined22:48
thiago sure, but I'm not trying to refer to upstream22:48
joako Is there any way to see what is in a commit? Because somehow its in the log but the change disappeared22:48
thiago the message comes from git status22:49
joako: git show <commit>22:49
rafasc thiago: try --no-ahead-behind22:49
thiago rafasc: no change22:49
dviola left22:49
rafasc thiago: it's weird, indeed.22:50
nedbat joako: you can change your settings so that --rebase is the default for pull22:50
vngx joined22:51
stats4647 joined22: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 remote22:51
I never did any push -f22:51
nedbat, I think I did that now but can I make it autostash too? Not sure why it forces you to stash to rebase22:52
Aelius left22:52
thiago rafasc: I can at least commit, if I do commit --no-status22:53
nedbat joako: https://cscheng.info/2017/01/26/git-tip-autostash-with-git-pull-rebase.html22:53
joako Ok but how can I get back the contents of the missing commit?22:54
Case_Of left22: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 commits22:55
nedbat joako: your commit still exists, we just have to figure out how to reference it22:55
joako git log shows the commit but the actual contents of it are not present22:55
vdamewood joined22:56
nedbat joako: then you have another commit that removed those lines from the codee22:56
Case_Of joined22:56
mescalinum left22: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 left22:58
Aelius joined22:58
rafasc if you nuke the reflog, git status will work again. But this is clearly buggy. I think you should report to the ML22:59
cdown left22:59
joako I try to cherry-pick the missing commits but still the files do not appear23:00
mirrorbird left23:01
cdown joined23: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 directory23: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 joined23:06
genevino left23:07
Case_Of left23: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 joined23:07
thiago I see23:10
mowcat joined23:10
archwizard left23:12
rafasc pretty sure I know why*23:13
Case_Of joined23:14
rafasc If you report to the list, send me the link or cc:me, curious if I'm right.23:14
tiin57 left23:14
genevino left23:14
genevino joined23:15
heyitsrama left23:17
tiin57 joined23:18
joako git mv wont accept a directory?23:19
LuxuryMode left23:20
Case_Of left23:21
Case_Of joined23:21
g00s left23:24
foul_owl_ left23:25
maestrojed left23:25
thiago joako: it will23:27
joako No... fatal: bad source23:32
tcsilver left23:36
foul_owl_ joined23:38
tiin57 left23:44
tiin57 joined23:47
EvanCarroll joined23:50
Cabanossi left23:50
archwizard joined23:52
Lucas_Gray left23: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 steps23:55
but `git mv dirname` works for me23:56
`git mv dirname newname` rather23:56
I do get a "fatal: bad source" if "dirname" (^) doesn't exist23:57
dfee left23:57
dfee joined23: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

Logs Search ←Prev date Next date→ Channels Documentation