IRCloggy #git 2018-03-29

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.

2018-03-29

weez17 left00:00
applecrumble left00:00
weez17 joined00:00
weijin left00:01
cagomez left00:01
_ikke_ left00:01
cagomez joined00:01
UTAN_dev_ joined00:02
rofl__ joined00:02
theology joined00:05
UTAN_dev left00:05
rafasc left00:06
lagothrix left00:06
_ikke_ joined00:06
nimomo joined00:06
rofl_ left00:07
Fernando-Basso left00:08
lagothrix joined00:09
dreiss joined00:11
pTrvr joined00:11
dendazen joined00:12
Kaisyu7 left00:12
nimomo left00:13
\void left00:13
yeshurun left00:14
pTrvr0 joined00:14
pTrvr left00:15
cagomez left00:16
cagomez joined00:17
pfleck left00:17
cagomez left00:18
sat-aton__ joined00:18
pTrvr0 left00:19
Coop56 left00:19
weijin joined00:19
permalink left00:20
nonconvergent joined00:21
nimomo joined00:21
sat-aton left00:21
nonconvergent I'm rebase master on a feature before merging it. I finished the rebase and resolved it but I must have done something that nuked some of the files on a particular commit. Is there a way to reapply that commit in place, and I'll resolve conflicts?00:22
pTrvr0 joined00:22
shinnya left00:22
nonconvergent The commit at issue is a very large one.00:23
but only some of the files are altered.00:23
weijin left00:24
weijin joined00:24
nonconvergent never mind I'm just going to redo the rebase00:24
nimomo left00:26
Kaisyu7 joined00:26
morenoh149 left00:27
ecuanaso joined00:27
sat-aton joined00:29
vamosdipa joined00:31
ecuanaso left00:31
lagothrix left00:31
sat-aton__ left00:31
vamosdipa left00:31
durham left00:31
morenoh149 joined00:32
lagothrix joined00:33
nimomo joined00:34
Bosna left00:34
m0viefreak left00:36
morenoh149 left00:37
morenoh149 joined00:38
nimomo left00:38
widp left00:38
garo left00:41
garo joined00:42
nonconvergent Ugh this is killing me. It says both added and both deleted for a bunch of moved files.00:42
weijin left00:42
cur8or_ joined00:42
dalias yes. there's no such thing as moving or even changing a file in git00:43
cur8or left00:43
dalias revisions are just states of the full tree. presenting that as a diff or as "added and deleted" vs "moved" is purely a presentation-layer matter00:43
git diff/log have options to search harder for moves and show you them as moves00:44
nimomo joined00:47
RougeR left00:47
g00s_ left00:47
nonconvergent dalias: what about when rebase creates a bunch of duplicate files with ~HEAD or ~<commit> appended to it and leaves them behind?00:49
weijin joined00:49
dalias every file is only stored once no matter how many times it occurs in different points in time (revision history) or space (the tree)00:51
Crypt0x joined00:51
dalias all objects in git are referenced by their sha1 hash00:51
nonconvergent intellij can't handle these (i use it for the visual reserve conflicts tool but i"m working off cli for everything else00:52
nimomo left00:52
VoradorPT left00:54
nonconvergent https://gist.github.com/nonconvergent/97deb936fb908eb05f08a2669233548c Intellij only shows the tracked00:54
dalias oh i think i misread00:55
sorry00:56
nimomo joined00:58
nonconvergent oh I understand. rm with remove both01:01
ShapeShifter499 left01:01
nonconvergent how do I merge this change during rebase?01:02
nimomo left01:02
mrproper joined01:03
mrproper I have two branches and one depends on the other. Is there a way I can take two files from one of the branches and move them the other without permanently merging? I just want it temporary so when the dependency branch is merged into mainline, I can back out of that 'merge'01:04
ShockingIsntIt left01:04
zaayer left01:06
nonconvergent I'm trying checkout -- <file> from the good (new) branch on all the adds01:08
nimomo joined01:12
duderonomy joined01:12
noobineer joined01:15
garo left01:16
garo joined01:16
finalbeta joined01:16
nimomo left01:17
piggah left01:17
nowhere_man joined01:18
fstd_ joined01:18
nowhereman_ left01:18
cur8or_ left01:18
Fuzzy_Pa_ joined01:19
taoqy joined01:20
fstd left01:22
fstd_fstd01:22
nowhereman_ joined01:22
nimomo joined01:22
asphyxia left01:23
linuxmodder joined01:23
lupine left01:24
linuxmodder left01:24
linuxmodder joined01:25
nowhere_man left01:26
zaayer joined01:26
nimomo left01:27
Sasazuka left01:28
Flechette joined01:29
nonconvergent left01:29
mattcen joined01:30
Fissure joined01:31
g00s joined01:31
ContessaTP left01:32
pTrvr0 left01:32
jready joined01:32
nimomo joined01:33
IanLiu joined01:33
piggah joined01:34
mattcen left01:35
mattcen joined01:36
Mattiaslndstrm left01:36
jready left01:37
nimomo left01:37
pTrvr0 joined01:39
nimomo joined01:39
zaayer left01:39
piggah left01:40
ShockingIsntIt joined01:42
afuentes left01:43
zaayer joined01:43
pTrvr0 left01:43
nimomo left01:44
Mike11 left01:44
ilbot3 left01:46
ResidentBiscuit joined01:50
lupine joined01:51
comptroller left01:51
nowhere_man joined01:51
nowhereman_ left01:54
ilbot3 joined01:57
Fuzzy_Pa_ left01:57
xaxxon joined02:00
mrproper left02:00
comptroller joined02:02
nimomo joined02:03
checkItOut joined02:03
morenoh149 left02:06
checkItOut left02:07
thiago left02:07
ResidentBiscuit left02:07
jleclanche left02:07
checkItOut joined02:07
nimomo left02:08
thiago joined02:09
thiago left02:09
thiago joined02:09
navy_seal9614 joined02:09
widp joined02:11
figurehe4d joined02:13
figurehe4d left02:16
kuzyn left02:18
nimomo joined02:18
asphyxia joined02:18
riceandbeans left02:19
mud joined02:20
jimmyrcom joined02:20
nimomo left02:23
SpeakerToMeat left02:24
boombatower left02:27
SpeakerToMeat joined02:27
itsdennian joined02:27
garo left02:27
garo joined02:27
itsdennian left02:28
itsdennian joined02:28
thiago left02:29
nimomo joined02:29
sentriz left02:30
ecuanaso joined02:30
piggah joined02:33
nimomo left02:33
ecuanaso left02:34
rexan joined02:35
d1b joined02:35
Ealderson joined02:35
pTrvr0 joined02:37
inovas joined02:38
Goplat joined02:38
nimomo joined02:40
IanLiu left02:42
pTrvr0 left02:42
garo left02:42
garo joined02:43
daidoji70 joined02:43
daidoji left02:44
nimomo left02:45
noobineer left02:46
garo left02:47
garo joined02:48
pTrvr0 joined02:49
energizer left02:50
raynold left02:52
energizer joined02:53
pTrvr0 left02:53
zaayer left02:55
weijin_ joined02:56
lagothri1 joined02:59
weijin left02:59
nimomo joined03:01
comptroller left03:01
IndianArya joined03:01
xaxxon left03:02
lagothrix left03:02
garo left03:02
noobineer joined03:03
harrymoreno joined03:03
garo joined03:04
nimomo left03:04
yeshurun joined03:07
garo left03:12
garo joined03:13
ToBeCloud joined03:14
gitinfo set mode: +v03:14
raynold joined03:15
foul_owl left03:16
MaekSo left03:19
johnflux_ left03:20
zivester left03:21
nimomo joined03:22
asphyxia left03:22
fr33domlover left03:24
Arcaelyx left03:25
dino82 joined03:25
dino82 left03:25
dino82 joined03:25
govg left03:26
sat-aton__ joined03:27
ixian left03:27
nimomo left03:27
Arcaelyx joined03:28
govg joined03:28
garo left03:28
Gurkenglas__ joined03:28
sat-aton left03:29
foul_owl joined03:29
MACscr left03:30
garo joined03:30
MaekSo joined03:30
canvon joined03:30
canvon_ left03:31
uikki joined03:34
uikki hey03:34
gitinfo uikki: 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.03:34
nimomo joined03:34
uikki i just did "git rebase upstream/master"03:35
noobineer left03:35
uikki but latest commit upstream has an issue, so i'd like to instead rebase on top of HEAD-1 on master03:35
can I do that now, or is it too late?03:35
johnflux_ joined03:36
sat-aton__ left03:38
linuxmodder left03:38
nimomo left03:39
nimomo joined03:43
thiago joined03:43
itsdenni_ joined03:43
itsdenni_ left03:44
itsdenni_ joined03:45
itsdenni_ left03:45
orbyt_ left03:46
mborgard left03:46
ixian joined03:47
itsdennian left03:47
religious joined03:47
UTAN_dev joined03:48
garo left03:48
johnflux_ left03:48
garo joined03:48
tchan1 joined03:48
irqq_ joined03:49
lpapp__ joined03:49
jfr_ joined03:49
nimomo left03:49
qassim left03:49
msp301 left03:49
Nugget_ joined03:49
ePirat left03:49
c^ left03:49
Nugget left03:49
rory_ joined03:49
rory left03:49
thiago left03:49
sonOfRa joined03:49
piggah left03:49
hypraware joined03:49
theology left03:50
lpapp left03:50
Snuupy left03:50
Learath2 joined03:50
msp301 joined03:50
religioustheology03:50
Snuupy_ joined03:50
UTAN_dev_ left03:50
jfr left03:50
raymond left03:50
qassim joined03:51
zizzfizzix joined03:51
c^ joined03:51
ericnoan joined03:51
ePirat joined03:51
uikki heeelp03:51
i just did "git rebase upstream/master"03:51
but latest commit upstream has an issue, so i'd like to instead rebase on top of HEAD-1 on master03:51
can I do that now, or is it too late?03:51
sw1m left03:51
idmistir left03:51
Mixologic left03:51
maryo joined03:52
janx left03:52
asphyxia joined03:52
Gabemo joined03:52
cdg joined03:52
Sc0rpius joined03:52
Dragon092 left03:52
sweatsuit left03:52
tang^ joined03:52
holodoc left03:52
thiago joined03:53
valkyr2e joined03:53
sweatsuit joined03:53
harrymoreno left03:54
Dragon092 joined03:54
Mixologic joined03:54
idmistir joined03:54
idmistir left03:54
idmistir joined03:54
imMute uikki: like, you want to make it as if you had ran something like "git rebase upstream/master-1" (ie, one commit before upstream/master) ?03:55
janx joined03:55
sw1m joined03:55
Ealderson left03:56
uikki imMute: yes03:56
cdg left03:56
imMute uikki: there's probably a one liner, but the way I would do it is to now run "git rebase -i upstream/master^". That'll do an interactive rebase one more commit back, and you can remove that broken commit from the list and let the rebase run.03:57
raymond joined03:57
holodoc joined03:57
rexan left03:58
rexan joined03:58
_xor left03:59
dendazen left04:00
garo left04:00
linuxmodder joined04:00
c0ded left04:00
firegurafiku joined04:01
garo joined04:01
IndianArya left04:02
IndianArya joined04:02
James0r2_ left04:02
IndianArya left04:02
rexan left04:03
rexan joined04:03
uikki ok04:03
thx04:03
uikki left04:04
nimomo joined04:07
kneeki left04:08
dviola left04:13
nimomo left04:13
linuxmodder left04:14
kyan left04:19
_xor joined04:21
widp left04:21
alyptik left04:22
alyptik joined04:22
widp joined04:22
mud left04:24
justanotheruser joined04:24
justanotheruser left04:25
thiago left04:25
justanotheruser joined04:25
justan0theruser left04:27
LichtMacher left04:33
nimomo joined04:34
widp left04:35
widp joined04:36
Thominus joined04:39
nimomo left04:39
tvw joined04:41
weijin_ left04:43
nimomo joined04:45
navy_seal9614 left04:47
nimomo left04:50
johnflux_ joined04:50
johnflux_ left04:50
johnflux_ joined04:50
xaxxon joined04:58
navy_seal9614 joined05:00
tombusby left05:00
ghost43 left05:00
Thominus left05:00
dermoth left05:00
tombusby joined05:00
Thominus joined05:02
h12o joined05:03
jungsubk joined05:03
linuxmodder joined05:03
pks left05:04
pks_ joined05:04
pks_pks05:05
Tryx left05:05
Snuupy_Snuupy05:06
Tryx joined05:06
jungsubk left05:06
h12o left05:08
navy_seal9614 left05:08
hbautista left05:08
navy_seal9614 joined05:09
navy_seal9614 left05:09
drodger left05:12
weijin joined05:13
nowhere_man left05:13
venmx joined05:14
max3 left05:14
drodger joined05:14
tec__ left05:15
maroloccio left05:16
foul_owl left05:17
tec__ joined05:17
drodger left05:19
drodger joined05:21
rexan left05:22
h12o joined05:22
sauvin joined05:23
jimmyrcom left05:23
rexan joined05:23
zefferno joined05:23
ToBeCloud left05:24
jimmyrcom joined05:25
foul_owl joined05:25
h12o left05:27
widp left05:28
AmR|EiSa joined05:29
AmR|EiSa Hello05:29
I try update qt git code But I got an error " Submodule path 'src/3rdparty/mapbox-gl-native': checked out '8c1be4ec01ef46bf453856531ebf53b48ce3dbe7' + git submodule init src/3rdparty src/3rdparty is dirty. Dirty submodule(s) present; cannot proceed. "05:29
armyriad left05:29
skisela joined05:29
weijin left05:32
AmR|EiSa left05:34
kyan joined05:36
xaxxon left05:40
dka Hi05:41
In a nodejs script, I want to query a git repository using the current user private key to get the latest version, what would be a good flow for doing that ?05:41
widp joined05:41
armyriad joined05:42
h12o joined05:42
comps joined05:43
freimatz joined05:44
garo left05:45
garo joined05:46
AmR|EiSa joined05:47
Crypt0x left05:47
h12o left05:47
dreiss left05:47
subhojit777 joined05:51
theology left05:51
Crypt0x joined05:53
pfleck joined05:54
weijin joined05:56
venmx left05:56
doug16k dka, this would be the obvious way -> https://www.npmjs.com/package/git otherwise, manually -> https://nodejs.org/api/child_process.html05:58
pfleck left05:58
dka doug16k, user case is, one of our developer type `start-app create app-name` and we check if the tools version is up to date before executing the process, otherwise we update05:59
because the tool was installed with npm install -g , we do not have a .git configuration05:59
doug16k that explains why you asked here the. i don't know06:00
then*06:00
AmR|EiSa Any help ?06:01
Branighan joined06:01
Crypt0x left06:01
kes joined06:02
pfleck joined06:02
dreiss joined06:03
tombusby left06:05
tombusby joined06:05
cdg joined06:08
garo left06:08
garo joined06:08
dka AmR|EiSa, what going on/06:09
AmR|EiSa dka: I try update qt git code But I got an error " Submodule path 'src/3rdparty/mapbox-gl-native': checked out '8c1be4ec01ef46bf453856531ebf53b48ce3dbe7' + git submodule init src/3rdparty src/3rdparty is dirty. Dirty submodule(s) present; cannot proceed. "06:10
raffo left06:10
fr33domlover joined06:12
cdg left06:12
dka I've never seen this error06:12
You should try on #mapbox06:13
cdg joined06:13
AmR|EiSa I don't think that about mapbox I do switch for 5.10 to 5.1106:14
leeN joined06:14
AmR|EiSa and I got that error06:14
Thominus left06:15
dka I've never heard about git 5.1106:15
AmR|EiSa Nop I meant Qt 5.1106:16
MACscr joined06:16
cdg left06:18
g00s left06:21
rofl__ left06:22
astrofog joined06:22
cdg joined06:23
dege joined06:24
Gurkenglas_ joined06:27
staafl_ left06:27
staafl_ joined06:28
cdg left06:28
AmR|EiSa left06:28
ArcaTech joined06:30
MACscr left06:30
MACscr_ joined06:30
armyriad left06:30
Gurkenglas__ left06:30
tkore\w joined06:31
tkore\w left06:31
tkore\w joined06:31
tkore\w left06:31
armyriad joined06:31
tkore\w joined06:31
tkore\w left06:31
tkore\w joined06:31
tkore\w left06:32
tkore\w joined06:32
tkore\w left06:32
tkore\w joined06:32
ioc_ joined06:33
zeroed joined06:35
Raging_Hog joined06:36
leeN left06:36
jcarpenter2 joined06:37
astrofog left06:37
arecaceae left06:38
arecaceae joined06:39
zefferno left06:39
Tobbi joined06:40
bz6 joined06:42
muelleme joined06:42
jrz5 left06:45
jimmyrcom left06:45
widp left06:47
widp joined06:49
heroux joined06:52
newbie|7 joined06:53
Nizumzen joined06:53
cur8or joined06:53
upperdeck left06:55
rexan left06:57
cur8or_ joined06:59
cur8or left06:59
subhojit777 left07:02
rfuentess joined07:02
widp left07:03
muelleme left07:03
widp joined07:03
pfleck left07:03
upperdeck joined07:03
wandering_vagran joined07:07
m1dnight_ left07:08
bwn left07:08
rexan joined07:10
seschwar joined07:13
ArcaTech left07:13
oxymoron93 joined07:14
goweol2 left07:15
thallada left07:16
scarabx joined07:17
foul_owl left07:17
abba joined07:17
zefferno joined07:18
bwn joined07:19
kgrimes left07:22
m1dnight_ joined07:22
floppydh joined07:25
NerdyPepper left07:26
goweol joined07:27
al-damiri left07:28
NerdyPepper joined07:29
Goplat left07:29
thallada joined07:30
dmone joined07:31
venmx joined07:31
solarjoe4 joined07:31
bolovanos left07:31
strk joined07:32
strk how can I remove merges in a branch ? I expected a squash-rebase of all commits to work without conflicts but it doesn't look like that works, unexpectedly07:32
foul_owl joined07:32
tarkus joined07:33
sammyg joined07:33
rchavik joined07:34
strk I tried also: git diff master > patch; git reset --hard master; patch -p1 < patch # and I get failures ? Hunk #1 FAILED at 15. ...07:35
theoceaniscool joined07:35
strk ok sorry it was just me being tired, I don't get failures07:35
_ikke_ strk: rebasing 'complex' history is not guaranteed to be conflictless07:36
MurkyLizard joined07:36
Raging_Hog left07:37
widp left07:39
finiteautomata joined07:42
CaptainTartwich joined07:42
strk I was not really rebasing as I was giving it an existing base07:42
widp joined07:42
strk just wanted to squash some commits07:42
so I picked an existing ancestor and rebased interactively to it07:42
CaptainTartwich left07:43
strk and tried to "s"quash ,so didn't expect any conflict07:43
ended up doing it via git diff | reset & patch07:43
which worked great07:43
now I've to cherry-pick the commits on top (can cherry-pick accept multiple commit as args ?)07:43
oxymoron93 yes it can07:44
in the order you want them to apply07:44
strk it did, great07:44
oxymoron93 you can specify range also07:44
scarabx left07:45
dreiss left07:45
widp left07:45
hph^ joined07:45
widp joined07:45
john-34 left07:45
strk I'm sure I'd hit an off-by-one if I try :P07:46
Cthalupa left07:48
schleppel joined07:51
Cthalupa joined07:51
tvale joined07:52
daidoji70 left07:52
Eryn_1983_FL left07:54
manuelschneid3r joined07:59
troyt left07:59
muelleme joined07:59
piggah joined08:00
troyt joined08:01
rokups joined08:03
hussam left08:03
staafl_ left08:04
muelleme left08:04
kurkale6ka joined08:10
venmx left08:10
flaviodesousa left08:11
kyan left08:13
YuGiOhJCJ joined08:14
kurkale6ka left08:16
zeroed left08:16
kurkale6ka joined08:16
widp left08:17
widp joined08:18
tvale left08:18
SuperSeriousCat joined08:22
zeroed joined08:22
doug16k left08:24
cdg joined08:25
dummydummydummy joined08:27
SuperSeriousCat Playing with git. Got a master with bot.py and created a develop tree with bot-dev.py. It is gone when I git checkout master so everything seem to work perfectly fine. Now how do I (the git way) change ALL content of master bot.py with bot-dev.py? It is a complete rewrite08:28
Flechette left08:28
john-34 joined08:28
gitinfo set mode: +v08:29
dummydummydummy Hi people, anyone know how i can get a list of files that'll be changed when I git pull?08:29
pfleck joined08:29
cdg left08:29
selckin git pull = fetch + merge08:30
reprazent joined08:30
m1dnight_ left08:31
tvale joined08:31
dummydummydummy selckin if that was to me, git fetch only gives output the first time you do it and it doesn't list files though?08:31
nowhere_man joined08:32
selckin then you can compare the difference between origin/master and master of example08:32
hussam joined08:33
m1dnight_ joined08:33
dummydummydummy ah, right yeah, so is origin/master the remote version and mine is master?08:33
selckin yes, see git branch -a08:33
x1b4 joined08:35
rexan left08:35
rexan joined08:35
nowhereman_ joined08:36
nowhere_man left08:36
joekeilty joined08:37
finalbeta left08:37
finalbeta joined08:38
freimatz left08:38
Nizumzen left08:38
finiteautomata left08:40
energizer left08:40
dummydummydummy thanks selckin I think i'm on the right path now...08:40
doug16k joined08:41
pfleck left08:41
x1b4 left08:42
CodeSlingerPaul joined08:42
staafl_ joined08:43
justanotheruser left08:44
nowhere_man joined08:45
nowhereman_ left08:45
jready joined08:45
tvw left08:46
freimatz joined08:46
shpoont joined08:47
i7c SuperSeriousCat, git mv bot-dev.py bot-py? :-D08:48
jaykay joined08:48
gitinfo set mode: +v08:49
amatas_ joined08:49
i7c There is not much to do with git, if you do poor-man's "versioning" of your stuff via file names. git doesn't care much about them.08:49
garo left08:49
jready left08:50
SuperSeriousCat How would the "rich man" version look like?08:51
freimatz left08:51
selckin why did you rename it? and "change all content of master" is very ambiguous too08:52
throw away current master history and replace it with the branch? put the branch history on top of it?08:52
i7c SuperSeriousCat, you could have branched off of master and what selckin says, why rename the file if it is supposed to be the same but in a different version?08:52
branches are *meant* to track the "same" files in different versions.08:53
jaykay hi! i'm writing a bash script to automate some rebase workflow. in there, i'm doing a "git rebase -i" (https://pastebin.com/dd3sajfD line 59 but its long and ugly). on two occasions when doing a reword in there, the rebase finished successfully, but the bash script continued at some seemingly random location, trying to execute some part of a comment, and a second time, parts of a previous command. i couldn't reproduce it since. anyone h08:53
venmx joined08:53
garo joined08:53
tvale left08:53
ContessaTP joined08:53
zeroed left08:54
tvale joined08:55
zeroed joined08:55
widp left08:55
widp joined08:56
i7c For starters, git-worktree is shaky :p08:56
selckin yeah what is that trying to do08:57
i7c don't you just want a rebase --autostash ?08:57
:D08:57
Not sure what "without dirtying the files of the rebased commit" means08:57
selckin git stash; git svn rebase; git stash pop08:58
skisela left08:58
jaykay the purpose is to perform the rebase without touching all the files that are changed in the rebased commits, that's what i'm trying to achieve. rebase --autostash sounds very nice, but that would imply touching all the files with local changes, which i tried to work around with that temporary commit08:59
we have long compile times, that's why touching files is kind of unwanted ;)08:59
the idea was to make the rebase in a worktree and then reset to the rebased branch.09:00
zeroed left09:01
selckin doesn't make any sense to me09:01
amatas_ left09:01
Thominus joined09:02
Asenar joined09:03
fairuz joined09:04
selckin do you not just do a normal update in the main worktree that is not dirty/developed it, and then update your "dev" to the result of that?09:04
jaykay selckin: okay, maybe i'm wrong :) but as far as i know, a normal rebase undos the commits to rebase, checks out a new branch, and re-applies the commits. as a result, all files changed in the rebased commits have a new modified date, even if they didn't actually change, and our compiler will treat them as changed. to work around this, this script performs the rebase in a worktree, and resets the original checkout to the rebased branch.09:04
resetting does not seem to touch files if they didn't actually change.09:04
sentriz joined09:05
jaykay selckin: i didn't quite understand your second message. to clarify, this is meant to update the currently worked on branch to a new upstream master (or svn trunk in this particular case)09:05
*rebase the currently worked on branch onto a new upstream master09:06
selckin why not have 2 worktrees forever09:06
jaykay this script kind of does, it keeps the second worktree09:06
ioc_ left09:06
cpr joined09:07
selckin but its just, git stash; cd ../pristine; git svn rebase; (maybe fix conflicts); ../dev/; git checkout -- .; git stash pop09:07
luckman212 left09:08
garo Situation: I forked a github rep from A, did some commits in my master and sent a pull request. I'm pretty sure A will merge it eventually into his master, but for now this hasn't happened (I barely know A)09:09
Gurkenglas_ left09:10
garo Meanwhile he continued with his own commits in master, i like them and also want them. What is the "best" way to get them ? Should i do a merge from my master ? Should i create a new branch and merge them there ? something else ?09:10
(This is a fictional situation at the moment, but i expect it to happen in the very near future)09:11
jaykay selckin: basically, yes. only that the script automatically creates the second worktree if needed, i replaced the stash usage by a temporary commit for less file touching, the two worktrees use different branches because they are not allowed to use the same branch, then add some error handling and the convenience --continue option, and then you have my script.09:11
tvale left09:12
cstratak joined09:12
luckman212 joined09:12
goweol1 joined09:12
kuzyn joined09:12
selckin jaykay: then i'd symlink the .Git dir and not use worktree09:12
jaykay: diff branches is just too much pain for this09:13
jast garo: easiest way to do this kind of thing without cluttering up your PR branch is doing your commits on a separate branch and create the PR from that09:13
jaykay garo: your two options are to rebase your master on their master, or to merge their master into your master. which option to use is a matter of taste :)09:13
goweol1 left09:13
NerdyPepper left09:14
jast the disadvantage of rebasing is that any commit comments and such that have been added to the PR will disappear on github09:14
jaykay but basically, the "correct" way would be what jast said.09:14
goweol left09:14
cpr left09:16
goweol joined09:17
Orphis left09:18
catsup left09:19
catsup joined09:19
jaykay selckin: could you elaborate? i'm not sure i see how that would actually simplify the script besides replacing a "git branch" with "checkout" and a reset with another checkout. also, it would actually still need a second branch since otherwise the branch of the first checkout will get changed, and aborting the rebase will need additional handling09:19
widp left09:19
catsup left09:20
widp joined09:20
catsup joined09:20
wootehfoot joined09:21
Orphis joined09:21
Oatmeal left09:21
selckin jaykay: you want 2 checkouts, and update the git state without affecting the files in one of them, so have a "pristine" and "dev" directory, with both the same .git (symlinked), in the pristine you can just git svn rebase, and resolve conflict and do everything you want, when done, in the "dev" directory, you now just need to checkout the changes made in the first, so could even just have staged your changes09:22
jaykay selckin: i could override the "worktrees need to have different branches" with a -f switch and thus implement your proposal while still using actual worktrees. i'll look into it again with this in mind09:22
selckin without commit and then git checkout -- .; without committing or stashing09:22
flaviodesousa joined09:23
selckin and no need for a script.09:23
thiago joined09:23
venmx left09:24
jaykay selckin: i thought about leaving the unstaged changes as they are and do a checkout -B instead of the reset, that's probably kind of the same thing09:24
mobarmeg joined09:24
mrkake joined09:25
selckin wait what i said doesn't work09:25
venmx joined09:26
tvale joined09:26
mobarmeg left09:26
cpr joined09:27
shpoont left09:27
jaykay something like that i've been doing in the past. (just s/symlink/worktree/ and s/stage/temporary commit/). i now want to bring this nice workflow to my fellow engineers and they said a script for that would be nice. so i write a script. i see nothing bad in that09:28
(plus, the script is still faster and more fun to watch than doing the six commands manually, so i even use it myself)09:28
Branighan left09:28
selckin i see the rebase being part of the script as a major pain point09:29
xPucTu4 joined09:29
synthmeat left09:29
cpr left09:29
afuentes joined09:29
venmx left09:30
hph^ left09:30
synthmeat joined09:30
strk left09:30
venmx joined09:30
garo PR branch (= PRivate branch ? )09:30
Furai left09:30
jaykay selckin: well, if it runs throught cleanly it's very convenient. if there are merge conflicts, than the user will need to cd ../pristine, there's no way around that09:30
garo: PR = pull request09:31
doug16k left09:31
garo ok, thanks to the both of you !09:31
jaykay selckin: or do you mean some other pain?09:31
garo: np :)09:31
lpapp__ left09:31
johnflux_ left09:33
doug16k joined09:34
cdg joined09:36
johnflux_ joined09:37
tvw joined09:40
cdg left09:40
johnflux_ left09:42
johnflux_ joined09:43
muelleme joined09:43
jready joined09:45
Furai joined09:45
dpl joined09:45
theoceaniscool left09:46
jready left09:49
Oatmeal joined09:49
muelleme left09:49
shpoont joined09:49
Oatmeal left09:51
weijin left09:54
akushner left09:54
cstratak left09:58
tarkus left09:58
strk joined09:59
MarioBranco joined09:59
strk git branch -r # shows me a rem/branch but there's no "rem" in my `git remote -v`09:59
how did that happen and how can I clean it up ?10:00
npgm left10:00
selckin git branch -D rem/branch10:00
tunekey left10:00
strk error: branch 'rem/branch' not found.10:00
selckin would be under remotes/rem/branch if remote (90% sure), otherwise you can use / in the name freely10:00
theoceaniscool joined10:01
cstratak joined10:01
strk error: branch 'remotes/rem/branch' not found.10:01
bongozig joined10:01
canton7 strk, by default, 'git fetch' doesn't remove remote-tracking branches which have been deleted from the remote10:02
strk show-ref tells me refs/remotes/rem/branch10:02
hph^ joined10:02
canton7 strk, run 'git fetch --prune', or set the config fetch.prune = true10:02
tarkus joined10:02
strk git fetch --prune # had not effect10:02
it really looks like "rem" is a remote10:02
but it is now known by "git remote -v"10:03
Phylock joined10:04
Oatmeal joined10:05
Zewwy joined10:06
Oatmeal left10:07
canton7 strk, hmm, can you post the output of 'git config --get-regexp ^remote\..+?\.fetch' ?10:09
YuGiOhJCJ left10:09
rafasc joined10:10
rewt left10:10
geoid joined10:11
rewt joined10:11
Master__ joined10:11
strk remote.origin.fetch +refs/heads/*:refs/remotes/origin/*10:11
+ another two lines replacing origin with "strk" and "exp" respectively10:11
nixjdm left10:12
robin left10:12
rchavik left10:12
canton7 right, so "rem" is definitely not a remote any more. Maybe it was at some point in the past10:13
dsdeiz left10:13
dimi1947 joined10:13
nixjdm joined10:14
plexigras joined10:14
robin joined10:14
weijin joined10:14
MarioBranco left10:14
escproxy joined10:16
strk right, so how do I clean that up ?10:17
YuGiOhJCJ joined10:17
weijin left10:18
Master__ left10:18
rafasc does it show with git remote show rem?10:19
amatas_ joined10:19
strk nope10:21
fatal: 'rem' does not appear to be a git repository10:21
nutron|w joined10:22
escproxy left10:23
piggah left10:23
m_surf joined10:23
joekeilty left10:24
weijin joined10:25
RougeR joined10:25
cpr joined10:25
rchavik joined10:25
joekeilty joined10:25
nutron|wirk left10:26
dummydummydummy what's the neatest way to get git to tell me (my script) if i'm ahead, behind or diverged from the main repo?10:27
rafasc strk: and git remote doesn't list rem as a remote right?10:27
canton7 strk, 'git update-ref -d' always works :)10:28
dummydummydummy, look at how __git_ps1 does it10:28
strk rafasc: right10:30
canton7: error: refusing to update ref with bad name10:30
guess I have to prepend refs/remote10:31
canton7 yeah, it's a low-level command that one10:31
strk yup10:31
dummydummydummy oh what a cool little app, thanks canton7 will read up10:31
rafasc might as well just delete the whole refs/remote/rem directory10:31
probably also run git fsck / git gc10:32
strk fsck found an handful of dangling blobg10:32
dummydummydummy looks like they're basically just grepping for the words 'diverged', thought that might be messy but if it's good enough for them it's good enough for me :)10:33
rafasc very suspicious that git fetch --prune isn't working in your case10:33
strk nor gc drops those dangling blobs and trees10:34
rafasc dummydummydummy: errm no..10:34
lightstalker joined10:34
FACILITY_GUY joined10:36
jaykay left10:36
Strepsils joined10:37
FACILITY_GUY Hi, I deleted folder with git rm -r, and now I can't add this folder again10:37
what can I do?10:37
ioc_ joined10:39
cpr left10:39
manuelschneid3r left10:39
manuelschneid3r joined10:40
czart__ joined10:40
rafasc dummydummydummy: git::../blob/03df4959472e7d4b5117bb72ac86e1e2bcf21723/contrib/completion/git-prompt.sh#L10410:40
gitinfo dummydummydummy: Git web link: https://github.com/git/git/commits/../blob/03df4959472e7d4b5117bb72ac86e1e2bcf21723/contrib/completion/git-prompt.sh#L10410:40
rafasc it's slightly more than just greping.10:41
dummydummydummy rafasc, what do you mean? ins't the line they set a diverge_pattern="# Your branch and (.*) have diverged" then see if it exists in the output, basically just searching for the word10:41
Master__ joined10:43
czart_ left10:44
widp left10:44
widp joined10:45
shpoont left10:45
amatas_ left10:46
rafasc dummydummydummy: where is this diverge_pattern you speak of?10:46
shpoont joined10:46
FACILITY_GUY left10:47
YuGiOhJCJ left10:48
bartman left10:49
thiago left10:49
ronator joined10:50
widp left10:50
widp joined10:50
dummydummydummy sry just looking through your link now, seems kinda complex, surprised git doesn't have some flags you can set to get clean output like --porcelain oh well no worries, thanks!10:50
widp left10:51
rafasc can you point me to the line you mentioned?10:51
maroloccio joined10:51
widp joined10:51
hfp_work joined10:52
hfp joined10:53
rafasc dummydummydummy: there's a one line answer to your question.10:55
but I need you to tell me where this diverge_pattern= thing is.10:56
or did you invent it?10:56
m_surf left10:56
tarkus left10:58
doug16k left11:00
ecuanaso joined11:00
widp left11:00
widp joined11:01
cstratak left11:02
widp left11:02
widp joined11:02
cstratak joined11:03
ecuanaso left11:05
dka Is there an equivalent command I can use for setting default upstream and downstream ?11:08
rafasc dka: a branch can only track one branch.11:08
escproxy joined11:09
checkItO_ joined11:10
dka I want all my user to pull from `dev` by default and to push to $(whoami)-dev by default11:10
My working directory is clean, there is nothing to pull or to push so no reason to use git pull or git push11:10
jtza8 joined11:10
gitinfo set mode: +v11:10
thiago_ joined11:11
bluepixe1bluepixel11:12
rafasc dka: in that case you can use a different pushurl for your dev's remote11:12
laidback_01 left11:13
rafasc git remote set-url --push origin https://link.to.remote11:13
checkItOut left11:13
rafasc that will override the url for push.11:14
Fernando-Basso joined11:14
checkItO_ left11:14
rafasc I think I misread your question, you want to push to different branches, not different remotes.11:15
jtza8 If I were to mark machine generated text files (xml) as binary in a .gitattributes file, would git then refuse to use a merge tool on it? (If a conflict were to happen.)11:16
dka rafasc, does it work for pull ?11:16
can I do `git remote set-url --push origin https://link.to.remote` in the middle of a CI/11:17
?11:17
and do I need write the https:// url ?11:17
I rather write11:17
git remote set-url --push origin dka-dev11:17
and11:17
git remote set-url --pull origin dev11:17
tarkus joined11:18
rafasc set url sets the url for the remote, not for a branch.11:19
Strepsils left11:19
rafasc that would work if you had different remotes for dev and dka-dev11:20
--pull doesn't exist.11:20
ginti joined11:20
ginti hey11:21
i fetched upstream and rebased. But for build-system reasons, I want to rebase to HEAD-2 (I'm currently on top, want to skip the commit below for now)11:21
ideas how to do that?11:21
Nizumzen joined11:22
canton7 ginti, so, rebase onto @{upstream}~2, rather than onto @{upstream} ?11:22
I'm not sure exactly what you mean by "rebase to HEAD-2"11:22
dummydummydummy rafasc sorry it was before you'd sent that link. i'd googled git ps1 and found a slightly different script that was changing the colour of bash depending on git status. wasn't from the link you sent me11:23
ginti my history after rebase is A->B->C (my commit is A) and I want the history to be A->C11:23
jay-m joined11:23
ginti canton7: ^11:23
canton7 ginti, right, so rebase onto C, rather than onto B11:23
ginti i've already rebased onto B11:23
so I can do the reabse onto C now? that's HEAD-2, right?11:23
rafasc dka: in short, the answer is no. You can make your devs make their upstream $(whoami)-dev, so they can push and pull from it freely, then ask them to push to the real dev branch with $git push origin $(whoami)/dev:dev11:24
canton7 then undo the rebase and rebase onto B, or you can do soemthing like 'git rebase --onto C B'11:24
uh, "and rebase onto C"11:24
ginti hum, no idea how rebases are undone :/11:24
dummydummydummy left11:24
dka rafasc, I am not sure you got me right11:25
user will be solo on their branch11:25
because they cant push on dev11:25
canton7 you can use 'git reflog current-branch-name' to find the hash of the commit you were on before you did the rebase. But 'git rebase --onto C B' is probably easier11:25
dka but some user might merge their change into dev11:25
fairuz left11:25
ginti --onto C B where C and B are commit hashes? canton711:25
dka this is why other user wont be able to merge if they try to do it without pulling from dev11:25
it make sens to pull from another branch in that situation11:25
so I think `git pull -u`, `git push -u` is what I want.11:26
geoid left11:26
canton7 ginti, where they are anything which refers to the commits C and B in your message. Those can be hashes, or relative refs (B is A^ for instance), or anything which can be turned into a commit11:26
dka it work fine when I do it, why cant I just set the same thing without using push or pull?11:26
geoid joined11:26
rafasc dka: git pull -u is not similar to git push -u.11:27
firegurafiku left11:27
shpoont left11:27
jtza8 left11:27
hfp_work left11:29
dimi1979 joined11:29
solarjoe4 left11:30
lightstalker left11:30
joekeilty left11:30
dimi1947 left11:30
joekeilty joined11:31
geoid left11:31
hfp_work joined11:32
Phylock left11:33
VladGh_ left11:35
thiago_ left11:36
RougeR left11:36
VladGh joined11:36
rafasc dka: I think it's the responsibility of the dev to chose what he pulls into their own private tree.11:38
weijin left11:39
daidoji joined11:39
dka rafasc, I think it is true11:39
but it is for a class11:39
so you should let me do for the good of the kid11:40
:D11:40
rafasc teach them right the first time then ;)11:40
dka yeah11:40
You do it11:40
You have 2 hours11:40
rafasc I do.11:40
dka and dont forget to do whats required for you to get paid11:40
;D11:40
vs reality11:40
rafasc well maybe they should find someone else more qualified to teach git to the kids ;)11:42
geoid joined11:42
dendazen joined11:43
maroloccio left11:44
rafasc have them publish the work, and an integrator merging their changes into dev11:44
similar how pull requests work in real life11:45
maroloccio joined11:46
ginti git reflog shows a commit I want my repository to be reverted to. How do I do that?11:47
rafasc way more valuable than teaching them using git in way they won't likely use elsewhere.11:47
ginti: depends if you're willing to rewrite history.11:49
you can git reset --hard <commit id> but you'll lose all commits you did after that commit.11:50
lightstalker joined11:51
rafasc this also falls under rewriting history. Since anyone who branched from these commits would have trouble merging back.11:51
!rewriting_public_history11:52
gitinfo [!rewrite] Rewriting public history is not recommended. Everyone who has pulled the old history will have to do work (and you'll have to tell them to), so it's infinitely better to just move on. If you must, you can use `git push --force-with-lease <remote> <branch>` to force (and the remote may reject that, anyway). See http://goo.gl/waqum11:52
geoid left11:53
widp left11:53
widp joined11:54
liefer left11:56
liefer joined11:57
rafasc ginti: another way, that doesn't rewrite is history is to checkout the contents of that reflog entry and commit that.11:57
git checkout <refloghash> -- .11:57
then you can commit and explain in the commit message this is a revert etc.11:58
kurkale6ka left12:01
weijin joined12:03
shinnya joined12:03
ginti left12:05
chris_wot left12:05
zaayer joined12:07
Bobdude left12:07
bartman joined12:08
weijin left12:09
dendazen left12:10
xaa joined12:10
widp left12:13
dendazen joined12:13
IanLiu joined12:14
nutron|w left12:17
kurkale6ka joined12:18
solarjoe4 joined12:18
ginti joined12:20
ecuanaso joined12:21
gadol joined12:22
dsdeiz joined12:22
dsdeiz left12:22
dsdeiz joined12:22
gadol left12:22
phluks joined12:23
johnflux_ left12:23
johnflux joined12:23
johnflux left12:23
johnflux joined12:23
ginti left12:26
pfleck joined12:29
nutron|w joined12:29
boombatower joined12:31
nutron|w left12:32
nutron|w joined12:32
Arcaelyx left12:32
tribly left12:32
tribly joined12:34
alcohol left12:35
johnflux left12:35
ghost43 joined12:35
alcohol joined12:35
dskull joined12:37
firegurafiku joined12:37
zaayer left12:38
comptroller joined12:40
cousteau joined12:40
cousteau I just realized that I forgot to add a file and commit its changes12:40
synthroid joined12:40
weijin joined12:40
cousteau now, for the sake of elegance, I'd like to fix that, but I'm not sure how to do it12:41
piggah joined12:41
rafasc cousteau: have you pushed said commit?12:42
garo Suppose i have 'newbranch' based on 'master' and this newbranch has 10 new commits, can i merge only commit (for example) 3,4,7 and 9 into master and ignore the others ?12:42
cousteau indeed I have12:42
garo At the moment i'm not interested in how to do it (yet), i just want to know if it's possible12:43
oxymoron93 yes you can use git cherry-pick garo12:43
garo thanks !12:43
cousteau It's a private repository anyway so it wouldn't be too terrible if I rewrote history12:43
rafasc then you can just add the file, and run commit --amend12:43
oxymoron93 tho it is not merge, it will just apply commits you want12:43
grawity if it's the last commit, just update with --amend, and push --force12:43
tymczenko joined12:43
cousteau but I think I'll try to do the right thing12:43
rafasc listen to grawity for the sake of completeness12:44
cousteau rafasc, grawity, the problem is that this is a couple of commits ago12:44
grawity then make a regular commit12:44
and use interactive rebase to move and squash that commit12:44
widp joined12:45
weijin left12:45
cousteau I think I'll try to do the right thing: travel back in time, add and commit the file (as I should have), commit the changes, then merge with the commit where I made the rest of related changes12:45
and then merge the rest12:45
...4 commits? No way. OK I'll rebase.12:45
oxymoron93 rebase!12:46
grawity your plan was basically "rebase, but manually"12:46
rafasc grawity: edit option from rebase feels so lonely.12:46
grawity sends rafasc a GitHug12:46
tarkus left12:46
cousteau grawity, well, it was more like "rebase, but with commits"12:46
rafasc cousteau: but that's what rebase is.12:47
rebase takes the commits and apply them on top of the new base.12:47
Asenar cousteau, you can do `git rebase -i` (for interactive) then flag the commit you want to edit so the rebase process will stop to let you edit or add other commits between12:47
safe joined12:47
cousteau rafasc, I thought rebase modified history12:48
grawity yeah you can use 'edit' but it's the same result except IMHO slightly more complicated12:48
cousteau: nearly any kind of "travelling back in time" involves modifying history12:48
cousteau not if I create a separate timeline12:48
rafasc cousteau: doing manually will also modify history.12:48
peacememories joined12:49
cousteau and then merge the two timelines12:49
how so? The individual commits would be unaffected.12:49
Asenar Or easier, if it's just a file you forget to add to the commit <abc123> (for example, you can `git add` the file, then `git commit --fixup=abc123`. Then, `git rebase -i --autosquash` so the commit will be automatically inserted where you want to12:49
rafasc but then you will have duplicate commits on both timelines, which are way worse than a commit one top saying "oops, forgot to add these"12:49
Asenar *not inserted after, merged with12:50
cYmen What's the easiest way to look at a view commits of diffs?12:50
oxymoron93 if ancestor is changed, so it is history12:50
cYmen er..diffs of commits...12:50
ie what were the last view things happening in the repo12:50
rafasc git diff commitA commitB?12:50
cousteau oxymoron93, the idea was not to change ancestors, just branch and make separate commits12:51
cYmen rafasc: yeah but then I end up going git diff HEAD^, git diff HEAD^ HEAD^^, git diff HEAD^^ HEAD^^^ and it gets annoying fast12:51
rafasc git log -p12:51
cYmen: ping12:52
cYmen pong12:52
oxymoron93 investigate what commit you want then use its sha or ref if any for git diff12:52
cYmen:12:52
weijin joined12:53
rafasc what he described is basically $git log -p; so I assume that's what he's looking for.12:53
cYmen rafasc: I cannot find -p in the man page. O_o12:53
rafasc --patch12:54
Asenar if you are investigating to find where in your history you made a mystake, you might use git bisect12:54
!bisect12:54
:/12:54
PtxDK left12:54
PtxDK joined12:55
oxymoron93 cousteau: why separate commits? you mean just one commit which adds file?12:55
duderonomy left12:56
Asenar I agree with rafasc, git log -p (for patch) is probably what's you want12:56
cousteau the file was not originally added; I should have added the original file, committed that, then modified all files (including that one) and commited that12:57
rafasc cYmen: first option after "COMMON DIFF OPTIONS" on the manpage12:57
cousteau you know what, I think I'll just add the file and forget about it12:57
weijin left12:57
cousteau I have a copy of the original somewhere; it's not a tragedy that I lose it12:57
AndresInSpace joined12:57
Eryn_1983_FL joined12:57
fr33domlover left12:58
kuzyn left12:58
mborgard joined12:58
agowa338 joined12:59
cYmen rafasc: thank you!13:00
rafasc cousteau: if you think it's important, just write in the commit message something like: add file 123123 forgot to add13:00
tymczenko left13:00
rafasc if you insist with the merge idea, I guess you could branch from the commit that missed the file, add a commit to add it, then merge it back.13:02
inovas left13:03
shinnya left13:03
fission6 joined13:03
inovas joined13:03
paxri01 joined13:03
widp left13:07
cousteau I have decided that this file is zero important and that I'm not going to revert it anyway; I just want to keep a copy of it around just in case I want to modify it again in the future.13:07
Asenar :/13:07
rafasc Maybe this was your initial idea when you said creating two timelines? Since we were talking about rebase I assumed you were trying to recreate the same branch (with 4 commits) but with the file added in the base commit.13:07
widp joined13:07
Asenar So you can create a branch, add the file with an appropriate commit message, then got back to your previous branch13:08
oxymoron93 and rebase13:08
cousteau rafasc, yes, that's what I meant; I wanted to avoid the headache of doing a rebase, but as I thought of the idea I got even lazier and decided to also avoid the headache of keeping a perfect commit tree and just committed the modified file13:09
the old version sucked anyway; I'm not going to go back13:09
Asenar But something like `git commit path/to/file --squash=<sha1> && git rebase -i <sha1>^ --autosquash` might be better if 6 month later you read your history13:09
kuzyn joined13:09
cousteau so far my commit history is mostly linear13:09
ZexaronS joined13:10
rafasc Asenar: he doesn't wan't to rewrite history. So rebase answers are ruled out.13:10
cousteau which makes sense since I'm the only "developer" of this "project" (it's actually my PhD thesis and I'm just using git to keep track of changes)13:10
tymczenko joined13:10
cousteau rafasc, to be honest I didn't want to rewrite history because it felt unelegant and I had already committed to my bitbucket copy13:11
rafasc and that leaves two options: either add a commit on top fixing the issue, or doing what he originally said: branching from the commit that is missing the file, add the file, and merge the two branches together.13:11
Asenar Rewriting is elegant and you can `git push --force` to bitbucket, but if you don't feel comfortable with that you have no obligation13:12
strk left13:12
rafasc cousteau: the only problem about rewrite history, is when people branch of your work. Because they will need to rebase their work on top of the new history.13:13
cousteau at the end I've gone through the path of least resistance13:13
plasticboy left13:13
Asenar rewriting can be something like changing «A → C → D → B» to «A → B' → C' → D'»13:13
rafasc and even on some occasions it's ok to do it. You just need to warn the people involved.13:14
bongozig left13:15
bongozig joined13:16
weijin joined13:16
Asenar you cut the last 3 commits from the history, you add your file (either with a commit or by adding it to the existing one), then you paste the 3 commit you previously cutted. It's very elegant (but do as your feel, if your history is «clean», a little merge will not make a mess)13:16
Since you 're the only one to use your repository, you can rewrite history safely13:17
jonno112 joined13:17
widp left13:18
rjsalts left13:18
cousteau yes but I realized it was way too much work (plus I'd need to learn how to do a rebase)13:18
Guest73086 joined13:19
Fernando-Basso left13:19
rajpratik71 joined13:20
rafasc cousteau: it's not that hard.13:20
Asenar rebasing is no work13:20
dimi1979 left13:20
rafasc if you used the method grawity suggested, it makes it super simple.13:20
stutter_ joined13:21
weijin left13:21
tchan1 left13:21
tchan joined13:22
rafasc git rebase -i <hash of commit missing the file>^13:22
Asenar What grawity told you to is to do this : 1) do your commit where you are 2) do `git rebase -i <sha1>^` (where <sha1> is the commit where you forget to add the file)13:22
plasticboy joined13:22
Guest73086 left13:23
Asenar then 3) in the editor that opens, move the last line that starts by `pick` at the top of the file, then save and exit13:24
rchavik left13:24
rafasc Asenar: 2nd line.13:25
Asenar And if instead, you think it's better to include that file in the <sha1> commit, you can do 1) `git commit path/to/file --squash=<sha1>` (this will create a commit and generate a message to prepare the interactive) then `git rebase -i <sha1>^ --autosquash`, and your commit will be already placed at the right place13:25
nd joined13:26
Asenar thanks rafasc, is right 2nd line :) (the first line is the commit without the file)13:26
ginti joined13:26
rafasc Asenar, --squash is just syntax sugar for editing pick to squash and moving the line below the appropriate commit.13:27
since he already has the commit, he could just do that himself in the todolist from rebase.13:28
zarzar left13:28
Asenar And I just found there is very few documentation on internet about --squash and --fixup :/13:29
rafasc man git commit13:29
gitinfo the git-commit manpage is available at https://gitirc.eu/git-commit.html13:29
rafasc all it's needed13:29
ginti left13:29
LichtMacher joined13:30
nd_ left13:30
jay-m left13:30
zaayer joined13:31
pfleck1 joined13:31
Asenar I observed that people which are not familiar with git rebase never (or almost never) do commit order change. Maybe because the order of the commit in the file is the opposite of what `git log` gives you13:32
tvw left13:32
zaayer left13:33
cur8or_ left13:33
thebope joined13:34
rafasc Asenar: people fear rebase a bit, due to everyone warning "careful cause this will rewrite history".13:35
x1b4 joined13:36
x1b4 left13:37
rafasc .digraph rankdir=LR;edge[dir=back];a->b->c;"..."->" ..."->{a fix};fix->c;node[shape=box];c->master;13:37
gitinfo .digraph: http://g.jk.gs/Fz.png13:37
x1b4 joined13:38
rafasc .digraph rankdir=LR;edge[dir=back];"..."->" ..."->a->b->c->fix;node[shape=box];fix->master;13:38
gitinfo .digraph: http://g.jk.gs/FA.png13:38
rajpratik71 left13:38
rafasc guess it's a matter of preference.13:38
shpoont joined13:39
rafasc messed up the merge one. blah13:40
rajpratik71 joined13:41
jready joined13:42
rjsalts joined13:42
Kaisyu left13:44
rajpratik71 left13:44
weijin joined13:45
rajpratik71 joined13:47
synthroi_ joined13:47
Asenar And with rebase it would be something like (first time I try that .digraph thing)13:48
.digraph rankdir=LR;edge[dir=back];"..."->" ..."->a->fix->b->c;node[shape=box];fix->master;13:48
gitinfo .digraph: http://g.jk.gs/FB.png13:48
asphyxia left13:48
dreiss joined13:49
Asenar .digraph rankdir=LR;edge[dir=back];"..."->" ..."->a->fix->b->c;node[shape=box];c->master;13:49
gitinfo .digraph: http://g.jk.gs/FC.png13:49
arooni left13:49
weijin left13:49
fahadash joined13:50
ronator left13:50
x1b4 left13:50
x1b4__ joined13:51
x1b4__ left13:51
synthroid left13:51
manuelschneid3r left13:53
manuelschneid3r joined13:54
Dougie187 joined13:56
zarzar joined13:57
Chaser left13:57
jonjitsu joined13:58
dpyro left13:58
cousteau left13:59
rajpratik71 left14:00
arooni joined14:00
Gurkenglas_ joined14:00
muelleme joined14:01
shpoont left14:01
tterrag|alt left14:01
rajpratik71 joined14:03
morenoh149 joined14:03
YuGiOhJCJ joined14:03
weijin joined14:04
Phylock joined14:04
muelleme left14:05
crose joined14:05
piggah left14:06
star_prone joined14:07
b4dger joined14:07
surfist left14:08
weijin left14:08
Phylock left14:09
jonjitsu left14:09
jonjitsu joined14:10
ZexaronS left14:10
dendazen left14:10
surfist joined14:10
barq If you have a repository with a lot of branches, does it make sense to only clone master and then checkout other branches when needed from the remote?14:10
rafasc you don't clone branches, you clone the whole repo.14:11
rajpratik71 left14:11
rafasc so, yes makes sense to checkout only when you need it.14:11
Asenar Branches are just «references» (which contains only the matching <sha1>)14:12
peacememories left14:13
rafasc at least until you use clone --no-single-branch, but that's tale for another time.14:14
rajpratik71 joined14:14
sammyg left14:15
tvale left14:15
greggerz joined14:15
cfoch__ joined14:15
fairuz joined14:16
star_prone left14:18
weijin joined14:19
bertschneider joined14:19
oxymoron93 left14:20
star_prone joined14:20
chachasmooth left14:20
bertschneider left14:20
tombusby left14:21
bertschneider joined14:21
tombusby joined14:21
bertschneider left14:23
madewokherd left14:23
MrBiogene joined14:23
bertschneider joined14:23
weijin left14:24
RougeR joined14:24
solarjoe4 left14:25
rajpratik71 left14:26
jay-m joined14:26
chachasmooth joined14:27
crose left14:28
dimi1979 joined14:28
tterrag joined14:28
rajpratik71 joined14:29
kneeki joined14:30
tvale joined14:30
thejoecarroll joined14:30
nikivi find . -name "*.bak" -type f -delete14:30
weijin joined14:30
nikivi How can I instead of delete file here, git rm --cache them?14:31
probably better question for #bash, sorry14:31
canton7 nikivi, -exec git rm --cache {} \;14:31
*cached14:31
nikivi find . -name "*.bak" -type f -exec git rm --cached {} \;14:31
?14:31
canton7 yep, but !backup first :)14:32
gitinfo Worried about your data while trying stuff out in your repo? The repository in its entirety lives inside the .git directory in the root of your work tree so to backup everything `cp -a path/to/workdir path/to/backup` or equivalent will suffice as long as the repo is not modified during backup. See also http://sethrobertson.github.com/GitBestPractices/#backups14:32
nikivi This will just remove it from git14:32
wont delete the file14:32
Just to make sure14:32
canton7 correct14:33
Master__ left14:34
tymczenko left14:34
Asenar nikivi, do you try to delete files tracked by git ?14:34
tymczenko joined14:35
nikivi Asenar I just have a file that I was tracking that I want to stop tracking14:35
Asenar ops, I misread, it's the opposite, sry14:35
nikivi canton7's cmd worked tho14:35
weijin left14:35
bwn left14:35
doug16k joined14:35
Sonderblade joined14:36
Asenar you can also add *.bak > .gitignore14:36
MoziM left14:37
cYmen How do I pull over a file from a different branch?14:37
Asenar a file ? not a commit ?14:37
nikivi Asenar That will stop tracking new .bak files. But old ones will still be tracked, no?14:37
Asenar yes14:37
rafasc cYmen: git checkou <commit> -- file14:38
Asenar no, in fact adding them in .bak will make git ignore all untracked files that ends by .bak14:38
flaviodesousa left14:38
Asenar So they will not appear when you `git status`14:38
rafasc cYmen: $git show commit:file > newfile; also works14:38
Asenar unless `git status --ignored`14:38
cdg joined14:39
rajpratik71 left14:39
MoziM joined14:39
MurkyLizard left14:41
dpl left14:42
rajpratik71 joined14:42
bwn joined14:43
czart__ left14:44
rajpratik71 left14:47
RougeR left14:47
rajpratik71 joined14:49
Asenar nikivi, if you want to remove them from the whole history, you might want to use git filter-branch rm file (but do it carefully as the command will delete the files)14:50
nikivi I just wanted to remove them from HEAD14:50
I think it worked14:50
tvale left14:50
fission6 left14:52
madewokherd joined14:52
kuzyn left14:52
tvale joined14:52
Testerbit joined14:53
NerdyPepper joined14:53
cYmen rafasc: thx14:53
pfleck left14:54
pfleck1pfleck14:54
Testerbit I'm trying to ignore all contents of a subdirectory(/src/semantic) it's contents using `/src/semantic/**` and `/src/semantic/**/*` and it's not working. How can I ignore this subdirectory and it's contents?14:54
nostrora joined14:55
osse How do you determine it's not working?14:55
weijin joined14:55
nostrora Hi! it's a good idea to share same private and public keys in multiple computer ? Because i want to push from my desktop computer and sometime from my laptop.14:55
ssh id_rsa keys*14:56
Testerbit the files are showing up in unstaged changes14:56
widp joined14:57
osse ah14:57
Testerbit: !ignore_tr14:57
gitinfo Testerbit: [!ignore_tracked] Git only applies ignore patterns to untracked files. You can't use ignore patterns to ignore changes to files that are already tracked by git. To remove files only from git, but keeping them on disk, use git rm --cached <file>. Still, see https://gist.github.com/1423106 for ways people have worked around the problem.14:57
liefer left14:57
Asenar Testerbit, `src/semantic/*` is your .gitignore should be enough14:57
rexan left14:57
liefer joined14:58
rexan joined14:58
weijin left15:00
abba left15:00
nostrora left15:01
daidoji left15:01
denimsoft joined15:02
fission6 joined15:02
jay-m left15:03
southernirc joined15:04
rajpratik71 left15:06
zefferno left15:06
durham joined15:08
star_prone left15:08
sleepingdeforest joined15:08
rajpratik71 joined15:08
markzen left15:09
star_prone joined15:09
star_prone left15:09
manuelschneid3r left15:10
al-damiri joined15:11
zeroed joined15:12
raffo joined15:13
YuGiOhJCJ left15:13
rajpratik71 left15:14
jdogherman left15:17
tkore\w left15:19
Testerbit left15:19
tvale left15:20
borkr joined15:25
RougeR joined15:26
weijin joined15:27
southernirc left15:30
antfoo left15:33
agowa338 left15:33
weijin left15:33
stoopkid joined15:33
menip joined15:35
menip left15:35
caffeinatedcode joined15:36
caffeinatedcode left15:36
caffeinatedcode joined15:36
rexan left15:36
caffeinatedcode left15:38
akushner joined15:40
cagomez joined15:41
cagomez left15:42
cagomez joined15:42
applecrumble joined15:43
akushner left15:44
weijin joined15:45
Oatmeal joined15:45
phinxy left15:45
caffeinatedcode joined15:46
caffeinatedcode left15:46
caffeinatedcode joined15:46
durham left15:46
durham_ joined15:46
widp left15:46
frem joined15:47
m0viefreak joined15:48
rajpratik71 joined15:49
weijin left15:49
rfuentess left15:50
[diecast] is there a way to have locally created branches track their origin once pushed? i'm currently editing .git/config and adding the upstream for all my branches.15:50
_ikke_ [diecast]: git push --set-upstream <remote> <branchname>15:51
(or -u)15:51
[diecast] ok, so add that to my initial push?15:51
_ikke_ yes15:51
Later you can also use git branch15:51
[diecast] is there any harm in making that an alias in bash?15:51
_ikke_ No15:51
ghormoon left15:51
[diecast] ok, thank you15:51
wandering_vagran left15:52
ghormoon joined15:53
noobineer joined15:55
zxd Hi15:56
how do I see the content of the index file stage file15:56
samort7 joined15:56
_ikke_ zxd: git show :<filename>15:56
samort7 Can anyone here give me some help with githooks?15:56
_ikke_ samort7: it usually helps to ask a concrete question15:56
Asenar samort7, don't ask if you can ask15:57
;)15:57
zxd _ikke_: I want to list everything staged15:57
samort7 i have a post-checkout.rb githook that's very simple: #!/usr/bin/env ruby puts"Hello"15:57
But when I checkout different branches, it doesn't run15:58
ProfMac left15:58
fairuz left15:58
djb-irc left15:58
synthroi_ left15:58
_ikke_ samort7: the hook should be called exactly post-checkout, without extension15:58
djb-irc joined15:58
samort7 The post-checkout.rb is in my .git/hooks folder15:58
Asenar zxd, you want to list files or changes ? `git status` list files that have staged changes. maybe `git diff --cached` is what you want.15:58
samort7 _ikke_ ah ok. I removed the extension and it still doesnt work15:59
Is there something wrong with my path maybe?15:59
ProfMac joined15:59
Asenar samort7, rename it to post-checkout, don't forget to chmod +x to allow execution (and check the shebang is correct, just in case )15:59
jready left16:00
Asenar and _ikke already answered ↑16:00
zxd _ikke_: I didn't know about this :<filename> colon syntax where can I read about it16:00
samort7 oops staff meeting brb16:00
zxd git show --help dosen't say16:00
jready joined16:00
zxd Asenar: all files staged, either from commit or that have been added with git add16:00
jready left16:00
phinxy joined16:01
jready joined16:01
dimi1979 left16:01
Asenar so you want all files known by git ?16:01
zxd Asenar: I guess from current commit and added with git add16:01
Asenar `git status` is not enough for you ?16:02
zxd Asenar: :)16:02
rafasc zxd: git help revisions16:03
is the place where you can read about the :path16:03
zxd does git pull remove non committed files but that were staged?16:03
_ikke_ zxd: no16:03
zxd it warns to commit first to not lose changes correct?16:03
_ikke_ yes16:04
devxxx joined16:04
devxxx hey i have a branch that i want to make the master branch, and discard all commits made on the master branch16:05
is this possible?16:05
Asenar git pull is (by default) like «git fetch + git merge» : git fetch just «check» the remote repository. git merge do a merge. So to prevent loosing local work, if some files are modified you get the warning16:05
zxd I am just playing with git reset --hard , I noticed it dosen't delete files that weren't staged but if I did add something with 'git add' and didn't commit git reset --hard will remove it16:05
osse devxxx: git branch -M master16:05
weijin joined16:05
osse When you're on your chosen branch16:05
Asenar nice trick I didn't know Osse, thanks !16:06
tarkus joined16:06
itsdennian joined16:07
Asenar zxd, git reset --hard works only for file previously added or commited. To remove untracked file, you can use git clean16:07
devxxx i'm on the master branch now... i cannot push though because of 'multiple streams'16:07
fatal: The current branch master has multiple upstream branches, refusing to push.16:07
_ikke_ note that master is not special, it's just a branchname16:07
kuzyn joined16:08
devxxx now it's trying to merge, osse16:08
well that fucked up everything16:09
Asenar devxxx, so it was a wrong question16:09
weijin left16:10
rajpratik71 left16:10
Asenar What do you really want to do ?16:10
Sonderblade left16:11
devxxx now i want to fix everything first16:11
Asenar If you want to push your «new» master branch to a remote repository, and discard all other changes, you also need to do `git push -f`16:11
what is the exact error message?16:12
devxxx16:12
rajpratik71 joined16:12
ProfMac left16:13
ProfMac joined16:15
johnflux joined16:15
rajpratik71 left16:16
devxxx this is confusing16:16
Mutter joined16:16
devxxx it's completely detached from the main branch16:16
weijin joined16:16
devxxx locally it says master is another branch after doing a clone16:17
osse My command forcefully renames the current branch to master, which accomplishes your goal.16:17
devxxx fatal: The current branch master has multiple upstream branches, refusing to push.16:17
Asenar first of all, if you want to be again or your previous branch, you can do `git branch -m oldbranchname`16:17
devxxx so now after renaming my branch to master, i cannot push16:18
Sonderblade joined16:18
borkr left16:18
Asenar «multiple upstream branch» is beacause you have more than one remote repository defined16:18
testnick123 joined16:18
devxxx i can't do that cuse it's trying to merge16:18
Asenar check the output of `git remote -v`16:18
rajpratik71 joined16:18
osse Asenar: That's not necessarily what it means16:19
Abbott joined16:19
osse devxxx: Edit .git/config . The section corresponding to the master branch probably has more than one "merge" entry16:19
Mutter left16:19
Abbott I'm trying to squash around 30 commits, but when I run `git rebase -i HEAD~30` I get: "fatal: Needed a single revision\ninvalid upstream HEAD~30"16:20
devxxx is there no way to make master another branch?16:20
without having to deal with this merge bs? cuse there will obviously be merge issues16:20
Asenar mhhhh… this is either that, either `git branch -vv` which have several remote matching «master» (which is in fact probably the case due to the renaming)16:20
tarkus left16:20
devxxx i cannot make any other branch master without merge?16:20
osse In hindsight it would probably have been better to delete master beforehand running my suggested command, sorry16:20
There is no merging here16:21
weijin left16:21
noobineer left16:21
Asenar This might be fixed by `git branch --unset-upstream master` then `git branch -u origin master`16:22
\void joined16:22
rvgate joined16:23
devxxx see i don't know what those commands do16:24
synthroid joined16:24
devxxx git is completely counter-intuitive16:24
rvgate left16:24
Asenar -u stands for --set-upstream16:25
rvgate joined16:25
rvgate left16:26
Asenar when you do `git push` from the master branch, there is implicit values, the complete command is `git push origin master:master`. That means «push to the remote «origin» my local branch «master» and update the remote branch «master»16:26
energizer joined16:28
cstratak left16:29
Asenar Theses links are defined in your .git/config file. Because of the command `git branch -M master`, your configuration has been updated, and contains an invalid line.16:29
so devxxx you can either edit your .git/config file, find the section [branch "master"] and remove the wrong lines16:30
lpapp__ joined16:31
lpapp__ hi, is there a way to run git branch --contains without cloning a remote repo?16:32
seschwar left16:32
lpapp__ git ls-remote ssh://gitserver/Git/myrepo.git -> does not give the branches so.16:32
Asenar either unset all upstream linked to master branch, then put the right one16:32
devxxx, maybe this will help you to understand : http://vpaste.net/bh6fb16:33
rajpratik71 left16:33
kfoonamalik joined16:33
ioc_ left16:34
Asenar Abbott, maybe HEAD^30 works better ?16:34
dalias i suspect the problem is complex merges in the window abbott is trying to squash down16:35
not sure how rebase works when some commits in base..HEAD have ancestors which are not descendants of base16:36
rajpratik71 joined16:36
muelleme joined16:37
weijin joined16:37
dalias it's easy to make an inextricable mess with merge commits unless you're careful only to merge at points of complete unrelated changes16:37
constantly merging a colleague's wip changes back and forth will yield a mess16:37
zeroed left16:38
fission6 left16:39
peacememories joined16:39
jready left16:40
weijin left16:41
Darcidride joined16:43
rajpratik71 left16:43
joekeilty left16:44
rajpratik71 joined16:46
testnick123 left16:47
peacememories left16:48
Mattiaslndstrm joined16:50
qouwse joined16:50
IanLiu left16:52
weijin joined16:54
kgrimes joined16:55
testnick123 joined16:55
kurkale6ka left16:55
kgrimes left16:56
sabu joined16:57
immune2iocane joined16:57
venmx left16:58
kgrimes joined16:58
sabu left16:58
denimsoft reset soft over the merge base and then do a new commit16:58
muelleme left16:59
rexan joined16:59
weijin left16:59
denimsoft git reset --soft $(git merge-base origin/master HEAD); git commit -m 'squashed commit'16:59
rajpratik71 left17:00
bertschneider left17:01
stutter_ left17:01
Anthaas left17:01
itsdenni_ joined17:01
m0viefreak left17:01
rajpratik71 joined17:02
djb-irc left17:02
Abbott so I can put * and !exceptionfile in a .gitignore to say "ignore everything except exceptionfile." But when I am listing files in a subdirectory, would I do subdirectory/!exceptionfile or !subdirectory/exceptionfile17:03
gitinfo [!filter_subdirectory] You can use filter-branch's subdirectory filter to split a directory from an existing repository into a new repository, keeping all history. https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/17:03
Abbott my bad lol17:03
akushner joined17:04
denimsoft left17:04
itsdennian left17:04
Asenar left17:04
tarkus joined17:05
_sjs joined17:09
sammyg joined17:09
Sonderblade left17:09
g00s joined17:10
rajpratik71 left17:10
samort7 _ikke_ & Asenar - I got it to work thanks to your help! Thank you!17:11
kuzyn left17:11
synthroi_ joined17:12
synthroi_ left17:12
piggah joined17:12
synthroid left17:12
synthroid joined17:13
dmone left17:13
rajpratik71 joined17:13
weijin joined17:13
akushner left17:15
evgie joined17:17
weijin left17:18
evgie left17:18
vvug joined17:18
vvug Hello. Does tagging a commit also tags the currently checked out submodule HEADs?17:19
ertes-w left17:19
grawity no, only if the commit references them17:19
vvug grawity: thanks. And how can I reference them in a commit?17:21
grawity while in the parent repo, you just `git add` the submodule dirs and commit17:21
bertschneider joined17:22
vvug fine, thanks grawity17:22
itsdenni_ left17:23
kuzyn joined17:23
weijin joined17:24
FOBABS joined17:25
rajpratik71 left17:25
synthroi_ joined17:26
fission6 joined17:27
rajpratik71 joined17:28
pfleck1 joined17:28
rajpratik71 left17:28
synthroid left17:28
synthro__ joined17:28
weijin left17:29
synthroid joined17:29
synthroi_ left17:29
synthroi_ joined17:30
synthroi_ left17:30
synthro__ left17:30
aspiers is git show --format=%P supposed to be identical to git show --format=format:%P at all times?17:30
synthroi_ joined17:31
aspiers because it prints an extra newline for me17:31
ProfMac left17:32
synthro__ joined17:32
dimi1979 joined17:33
stutter_ joined17:33
synthroid left17:34
ProfMac joined17:34
synthroi_ left17:35
synthroid joined17:35
vvug left17:36
Gurkenglas_ left17:36
synthro__ left17:36
muelleme joined17:36
floppydh left17:37
aspiers is there a better way to count a commit's parents than git show -s --format=%P $1 -- | sed 's/ /\n/g' | wc -l ?17:37
that seems like an ugly hack17:37
scarabx joined17:38
IanLiu joined17:39
scarabx left17:40
LichtMacher left17:41
dviola joined17:41
escproxy left17:42
muelleme left17:42
Whiskey How do i marege a git brench whit my master ?17:42
Bobdude joined17:44
escproxy joined17:44
grawity aspiers: fyi, wc stands for "word count" and your `| sed 's/ /\n/g' | wc -l` is no better than just `| wc -w`17:45
jay-m joined17:45
flying_sausages left17:46
aspiers grawity: oh yeah, nice point :)17:46
grawity you can do `git rev-parse $1^@ | wc -l` if you want17:46
flying_sausages joined17:46
Fernando-Basso joined17:46
aspiers grawity: that's even shorter than | xargs -n1 | wc -l17:46
Hello71 left17:47
flying_sausages left17:47
flying_sausages joined17:48
aspiers ok, the ^@ trick wins :)17:48
grawity: thanks, both awesome tips!17:48
kuzyn left17:49
Singmyr joined17:50
LichtMacher joined17:50
rexan left17:50
Hello71 joined17:51
akushner joined17:52
synthroi_ joined17:52
weijin joined17:53
FOBABS left17:54
emg left17:56
synthroid left17:56
frem left17:56
thebope left17:57
weijin left17:57
testnick123 left17:57
synthroi_ left17:59
synthroid joined18:00
ProfMac left18:00
emg joined18:00
ibiam joined18:01
ibiam left18:01
ibiam joined18:01
rafasc aspiers rev-parse has --count18:02
at least recent versions do.18:02
aspiers I guess I'm out of date then18:02
2.16.1 doesn't AFAICS18:02
rafasc forget that18:03
pfleck left18:03
pfleck1pfleck18:03
rafasc was thinking about rev-list18:03
synthroi_ joined18:03
aspiers np ;-)18:03
phluks left18:03
Cavallari joined18:04
Arcaelyx joined18:04
beerdrop left18:04
royal_screwup21 joined18:05
synthro__ joined18:05
synthroid left18:05
royal_screwup21 does the concept of left-sided or right-sided merge hold in git? For instance, if I'm on branch test and I want to merge test with master. If I do git merge master -- does that merge my test branch into master, or will it merge master into test?18:07
testnick123 joined18:07
crose joined18:07
royal_screwup21 naw never mind18:08
just realized git merge master vs git merge test will have the same effect18:08
synthroi_ left18:09
koala_man joined18:09
koala_man how do I change the date of a tag?18:09
aspiers I think you have to delete it and recreate18:10
synthroid joined18:11
kneeki left18:11
ibiam royal_screwup21, git merge master when your current branch is test merges master into test and the reverse is the same18:11
koala_man oh duh, I set GIT_COMMITTER_DATE but didn't export it :|18:11
Sasazuka joined18:11
ibiam left18:12
synthroid left18:13
jonno112 left18:13
synthro__ left18:13
Cavallari left18:13
synthroid joined18:13
synthroi_ joined18:14
ibiam joined18:14
dimi1979 left18:15
jwest joined18:15
sauvin left18:16
tymczenko left18:17
synthroid left18:18
beerdrop joined18:19
sammyg2 joined18:21
qqx left18:21
qqx joined18:22
sammygGuest9811318:22
testnick123 left18:24
synthroi_ left18:25
Guest98113 left18:25
synthroid joined18:26
sammyg2sammyg18:26
weijin joined18:27
Phylock joined18:29
rafasc aspiers: $git rev-list --no-walk --count HEAD^@18:30
muelleme joined18:31
weijin left18:31
Sasazuka__ joined18:31
Sasazuka left18:32
rafasc rev-list can do it after all18:33
bertschneider left18:34
ibiam left18:34
cdg_ joined18:35
cdg_ left18:35
dreiss left18:35
ibiam joined18:35
ibiam left18:35
cdg_ joined18:35
weijin joined18:35
ibiam joined18:36
royal_screwup21 "git merge <branchname> -X theirs" is so handy!18:36
ibiam left18:36
synthroi_ joined18:37
ibiam joined18:37
tymczenko joined18:37
firegurafiku left18:37
cdg left18:38
Narrat joined18:39
tymczenko left18:39
cdg_ left18:39
synthroid left18:39
weijin left18:40
zeddymac joined18:41
ProfMac joined18:41
samort7 left18:41
RougeR left18:41
kneeki joined18:42
Darcidride left18:42
zeddymac left18:42
hbautista joined18:42
synthroid joined18:43
pfleck1 joined18:46
synthroi_ left18:47
jottr joined18:47
ioc_ joined18:48
hugdru joined18:51
borkr joined18:52
ibiam left18:52
ibiam joined18:53
Bobdude left18:53
Phylock left18:54
Phylock joined18:55
iliakan joined18:59
adrian_1908 joined18:59
gitinfo set mode: +v18:59
iliakan Hi18:59
Is it possible that a rebase does not have conflicts, while merge has them?18:59
KeyJoo joined19:00
alexpainen joined19:00
ailaG joined19:01
infinisil left19:01
MurkyLizard joined19:01
MurkyLizard left19:02
ailaG Hi, I have an existing repo with code, and someone downloaded the files and extended upon them, without cloning. But it should be a new “commit”. How would you go about merging that into the repo? init then branch then merge on the server? Just init then pull, commit, push?19:03
alexpainen left19:03
weijin joined19:03
cbreak ailaG: git checkout -b tmp basecommit19:03
ailaG: where basecommit is a commit that contains the file version that was copied19:04
piggah left19:04
cbreak then replace the file with the modified version, commit19:04
then you can merge that branch as normal19:04
synthroi_ joined19:05
synthroi_ left19:05
b4dger left19:06
synthroi_ joined19:07
synthroi_ left19:07
synthroid left19:07
weijin left19:07
synthroid joined19:07
Tryx left19:08
synthroi_ joined19:08
synthroi_ left19:10
synthroid left19:10
bertschn_ joined19:10
kneeki left19:10
synthroid joined19:10
rexan joined19:10
rafasc iliakan: The rebase vs merge is not a thing to prevent conflicts. It's about writing history.19:10
zumba_addict joined19:12
alexpainen joined19:12
goodafternoon joined19:12
goodafternoon left19:12
ailaG cbreak: Thanks. So basically check out origin/master into another branch then merge it into the new code then19:12
bertschn_ left19:13
cbreak if that's where it came from, sure19:13
ailaG It’s a tiny project with a single developer who I’m replacing now19:13
iliakan|2 joined19:13
bertschneider joined19:14
ICanHazShell joined19:14
ailaG 5 php files19:14
ICanHazShell left19:14
iliakan left19:14
ailaG And a couple of static files19:14
cbreak yeah, then it's easy19:14
you don't even need to create a new branch19:14
infinisil joined19:15
synthroid left19:15
ailaG I’m guessing that 4 lines have changed, I just want to do it right because I’m not completely sure what the prev. developer did19:15
jottr left19:16
Gianormagantrous left19:16
Gianormagantrous joined19:17
goodafternoon joined19:17
goodafternoon left19:17
muelleme left19:17
LichtMacher left19:18
tunekey joined19:18
theology joined19:19
rkta joined19:19
boomshankerx joined19:20
sleepingforest joined19:21
sleepingdeforest left19:24
boomshankerx left19:24
zumba_addict left19:25
zumba_addict joined19:25
xaxxon joined19:26
zumba_addict i git rebase and i ran git rebase --continue Now it's saying "mark them as resolved using git add". I ran git add then git commit then finally git push -u -f. It just said "Branch new-deployment set up to track remote branch new-deployment from origin."19:26
bwn left19:26
zumba_addict it also said "Everything up-to-date"19:26
rexan left19:26
zumba_addict I went to my merge request but my code is still old one19:26
_ikke_ zumba_addict: did you finish the rebase?19:27
zumba_addict i ran git commit too19:27
what command I missed?19:28
_ikke_ git rebase --continue after the commit?19:28
zumba_addict: what does git status say?19:28
zumba_addict ah, it says again git rebase --continue19:28
No changes - did you forget to use 'git add'?19:28
_ikke_ right, so the rebase wasn't finished yet, so you push the old branch that hasn't moved yet19:28
zumba_addict oh, what should I do now?19:28
_ikke_ zumba_addict: because you already comitted, probably git rebase --skip19:29
zumba_addict ok19:29
it just went back to the prompt19:29
_ikke_ zumba_addict: what does git status say now?19:29
zumba_addict it says "Your branch and 'origin/new-deployment' have diverged,"19:29
_ikke_ right19:29
maks_ joined19:29
zumba_addict git log shows the newest commit i used19:30
do I git push -f again now?19:30
piggah joined19:31
_ikke_ yes19:31
zumba_addict I think I should do that to overwrite it19:31
oh cool. thanks19:31
raynold left19:32
zumba_addict what was the wrong step I did earlier?19:33
_ikke_ zumba_addict: you did not finish the rebase, after git add, you could've just run git rebase --continue again19:33
zumba_addict ah, got it19:34
here is what I did. I fixed conflicts and I ran git rebase --continue19:34
i didn't run git add19:34
kneeki joined19:35
zumba_addict then I ran git status and I saw " No changes - did you forget to use 'git add'?"19:35
_ikke_ right19:35
jottr joined19:35
zumba_addict I ran git add then git commit, then git push :D19:35
jungsubk joined19:36
anotherone joined19:36
anotherone hey guys19:36
gitinfo anotherone: 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.19:36
zumba_addict but looks like after git add, i should run git rebase --continue then git commit. RIght?19:36
jottr_ joined19:36
bwn joined19:36
anotherone i get "Permission denied (publickey)." - "Could not read from remote repository"19:36
i cloned the repository it seams to work fine19:36
i also set the url19:37
jnavila joined19:37
_ikke_ zumba_addict: no need to run git commit19:37
zumba_addict: git rebase takes care of that19:37
cagomez left19:37
fr33domlover joined19:37
anotherone is it possible that a repository uses a different ssh key?19:37
VoradorPT joined19:37
_ikke_ anotherone: no19:37
sammyg left19:37
_ikke_ anotherone: the key allows you to login to ssh19:37
cagomez joined19:38
anotherone i don't understand what could be the issue19:38
_ikke_ anotherone: what kind of server is this?19:38
anotherone bitbucket19:38
permalink joined19:39
_ikke_ anotherone: do you have access to that project?19:39
weijin joined19:39
jottr left19:39
anotherone yes im sure so what could be i could not push with https so i decided to change to ssh don't know why i didn't use this before19:40
so i did "git set-url remote ...."19:40
star_prone joined19:40
anotherone i also use gitflow but don't know if that should be an issue19:42
_ikke_ nope19:42
cagomez left19:43
anotherone im 100% sure ive added the ssh key to bitbucket i also was able to clone the repository with it and with that repository i am alos able to push19:43
_ikke_ anotherone: try ssh -T [email@hidden.address]19:43
anotherone logged in as ...19:44
You can use git org hg to connect to Bitbucket...19:44
Shell access is disable19:44
weijin left19:44
_ikke_ Ok, that sounds good19:44
anotherone atleast :P19:45
duderonomy joined19:45
anotherone could it be a issue that i did the last commit with https configured and now try to push it with ssh ?19:46
no right?19:46
_ikke_ nope19:46
weijin joined19:46
_ikke_ I think you should ask bitbucket, they can give you more accurate help19:46
rexan joined19:48
zumba_addict cool19:48
anotherone i would copy the whole folder to the cloned repository but this want be good for the history and so i guess19:48
but don't you have any idea19:48
_ikke_ well, the basics are working, your ssh key is giving you access to bitbucket19:48
after that, it's bitbuckets code that decides whether you have access19:49
I don't have insight in that19:49
adrian_1908 left19:49
weijin left19:50
skered joined19:52
tarkus left19:54
kes left19:54
anotherone ok i think i know what my mistake was19:57
just wasted an hour for nothing xD19:57
git remote set-url should be git remote set-url origin xD19:57
ZexaronS joined19:58
bertschneider left19:59
ecuanaso left20:01
Emperor_Earth joined20:01
manuelschneid3r joined20:03
firegurafiku joined20:03
steven joined20:04
dpyro joined20:05
bertschneider joined20:05
phluks joined20:05
duderonomy left20:07
jottr_ left20:11
FilipNortic joined20:13
jungsubk left20:14
kneeki left20:14
maks_ left20:15
FilipNortic_ left20:16
weijin joined20:17
rexan left20:17
hph^ left20:18
ibiam left20:20
kneeki joined20:20
weijin left20:21
Mattiaslndstrm left20:22
cagomez joined20:22
Mattiaslndstrm joined20:22
Olipro left20:22
cdg joined20:23
s17 an hour for learning -- you're special20:23
borkr left20:23
jay-m left20:24
raymond left20:24
anotherone left20:26
dwmw2_gone joined20:26
Olipro joined20:26
OliproGuest4155320:27
akushner left20:27
hugdru left20:28
jottr_ joined20:29
jay-m joined20:29
akushner joined20:29
felixsanz left20:31
cdg_ joined20:32
Nizumzen left20:32
hph^ joined20:32
kgrimes1 joined20:32
rafasc left20:32
akushner left20:33
alexpainen_ joined20:33
johnflux left20:33
madewokherd left20:34
kgrimes left20:34
cdg left20:35
njbair joined20:36
ioc_ left20:36
felixsanz joined20:37
deltam left20:37
alexpainen left20:37
Sasazuka__Sasazuka20:37
manuelschneid3r left20:39
nowhereman_ joined20:39
cagomez left20:41
thiago joined20:41
jay-m left20:41
cagomez joined20:41
Bobdude joined20:42
cagomez left20:42
cagomez joined20:42
nowhere_man left20:43
renken joined20:46
applecrumble left20:48
jonjitsu left20:48
renken hello, I'm a newbie and working with git for my first project. I have a question. I did some work on my branch X and my friend then merged his work and mine in branch Y, now I wanna basically overwrite branch X with Y content. can I do it without merging? *i don't want to create a third branch and work on it*20:49
sanscoeur left20:50
sanscoeur joined20:50
royal_screwup21 left20:51
jonjitsu joined20:52
paxri01 left20:52
alexpainen_ left20:53
weijin joined20:54
Emperor_Earth left20:54
cagomez left20:55
cagomez joined20:55
star_prone left20:56
Catatronic left20:57
hbautista_ joined20:58
hbautista left20:58
reprazen_ joined20:59
reprazent left20:59
cagomez left21:00
Catatronic joined21:00
jfr_ left21:00
sammyg joined21:01
weijin left21:02
cbreak renken: why?21:03
jfr joined21:03
renken cbreak, what do you mean why?21:03
cbreak what's wrong with just merging his branch into yours?21:03
renken oh im lazy21:04
cbreak it's trivial21:04
renken plus merging seems hard21:04
cbreak git merge Y21:04
done21:05
renken but i'd need to manually fix conflicts21:05
cbreak it should be fast forward unless you made changes since the other merge21:05
IanLiu left21:05
cbreak no conflicts.21:05
renken ex: he added his functions before mine. which means conflict at line 2521:05
cbreak he merged your code21:06
now he has both21:06
you have nothing he doesn't have21:06
-> no conflict21:06
!cs21:06
gitinfo "Git for Computer Scientists" is a quick introduction to git internals for people who are not scared by phrases like Directed Acyclic Graph. http://eagain.net/articles/git-for-computer-scientists/ See also !concepts !bottomup21:06
renken i'll try so then!21:08
LichtMacher joined21:09
weijin joined21:09
rokups left21:10
renken thank you cbreak. guess I shouldn't be so scared21:10
m0viefreak joined21:10
jnavila left21:10
cbreak renken: if a merge fails, git will tell you21:11
Achylles joined21:11
cbreak and you can git merge --abort to give up on it if you want21:11
there's no danger in trying21:11
as long as you don't have uncommitted changes :D21:11
(but you can stash or commit those)21:11
renken I need to learn more about merging21:11
oh no worries, I commit my stuff like CTRL+S :"D21:12
piggah left21:12
weijin left21:14
dviola left21:14
piggah joined21:16
jonjitsu left21:16
koala_man left21:17
sammyg left21:17
zarzar left21:20
hph^ left21:21
yeshurun left21:22
ecuanaso joined21:23
yeshurun joined21:25
raynold joined21:27
_sjs left21:29
AndresInSpace left21:29
Sasazuka if I have something in git on path /x/y/z - is there some way to do a "git checkout commit -- /x/y/z/foo" from /a21:29
Mattiaslndstrm left21:30
Sasazuka I think I need to manually specify the parent directory21:30
cbreak if you want to interact with git, you have to be inside the repository, or specify the repository21:30
weijin joined21:30
Sasazuka sounds like the latter?21:30
cbreak see --git-dir and --work-tree for the latter21:30
jottr_ left21:31
jstimm left21:33
Bonjourm8 joined21:33
Sasazuka ahh -C seems to do the trick21:34
thanks!21:34
einnjo joined21:35
Achylles left21:38
weijin left21:38
thiago left21:38
permalink left21:38
RougeR joined21:39
bwn left21:39
dreiss joined21:40
xfbs_ joined21:40
pfleck1 left21:41
thxffo left21:41
piggah left21:42
permalink joined21:42
hunterlabs left21:42
xfbs_xfbs21:42
fission6 left21:45
staafl__ left21:46
xfbsxfbs-away21:46
xfbs-awayxfbs21:47
cagomez joined21:48
chris_wot joined21:48
thxffo joined21:48
hunterlabs joined21:48
Mattiaslndstrm joined21:48
bwn joined21:48
xfbs left21:48
xfbs joined21:49
xfbsxfbs_21:49
xfbs_ left21:51
ferdna joined21:52
navy_seal9614 joined21:52
stoopkid left21:53
KeyJoo left21:55
crose left21:56
Dougie187 left21:59
fairuz joined21:59
sanscoeur left22:00
cagomez left22:00
sanscoeur joined22:00
xfbs_ joined22:02
emg left22:02
xfbs_ left22:04
weijin joined22:06
Nizumzen joined22:07
madewokherd joined22:10
mikado joined22:10
sanscoeur left22:11
morenoh149 left22:11
weijin left22:11
shpoont joined22:13
kn-928 joined22:13
gitinfo set mode: +v22:14
mikado Can you recommend a production-ready git-lfs server for the enterprise? (no full-blown solutions with issue tracking, wiki etc. such as github or gitlab)22:14
immune2iocane left22:14
star_prone joined22:14
permalink left22:15
piggah joined22:19
star_prone left22:20
firegurafiku left22:20
nowhere_man joined22:22
nowhereman_ left22:22
satifant joined22:23
sleepingforest left22:24
permalink joined22:24
GavinMagnus1 joined22:27
GavinMagnus1 left22:27
UTAN_dev_ joined22:30
jottr_ joined22:31
weijin joined22:32
tkore left22:32
dedondesta joined22:34
dedondesta i'm using gogs, is there a way to autoupdate my dir (do git pull) when someone pushes changes to gogs22:35
nevyn lfs?22:35
gitolite22:35
dedondesta i guess it is called auto deploy22:36
weijin left22:37
nevyn eww large file storage.. just no22:37
dedondesta ok i found webhooks, thanks22:39
weijin joined22:41
greggerz left22:43
fairuz left22:43
stutter_ left22:44
Puffball joined22:45
weijin left22:46
mikado looking at gitolite right now. What is the problem with large file storage?22:46
th1nkf4st joined22:48
staff0rd joined22:48
staff0rd left22:48
phluks left22:49
th1nkf4st heyaa, i forked a project on github and its syncd with master, i created a new branch where i will workon but i need to pull a branch(from original repo) to my repo new_branch22:50
cagomez joined22:50
UTAN_dev_ left22:51
th1nkf4st git pull origin master will go to my master i can do something like git pull origin original_repo_branch ? ( this wont work ofc ) but what steps should i do ?22:51
inovas left22:51
dsdeiz left22:51
IanLiu joined22:52
th1nkf4st whith git show remote_branhc:./path/to/file it show the file that i need to work with22:52
UTAN_dev_ joined22:53
gitinfo set mode: +v22:54
UTAN_dev Hey all, I can't add a file, yet it doesn't seem to be ignored. https://www.pastery.net/ymtjhf/ A quick look would be much appreciated.22:54
The file exists / ownership/perms seem OK / another file from that directory was added just fine22:54
It's a new file, BTW22:55
fahadash left22:55
th1nkf4st have u checked gitignore ? sometimes happenz lol22:56
fairuz joined22:56
stevelitt How do I look at, but not touch, the last committed version of a specific file?22:57
threenuc joined22:57
th1nkf4st left22:57
UTAN_dev I did, and also used `git check-ignore includes/request-sanitizer.inc` to make sure I didn;t miss anything22:57
fairuz left22:58
Singmyr left22:59
inovas joined23:00
cagomez left23:02
YuGiOhJCJ joined23:03
cbreak stevelitt: git cat-file can do that23:03
finalbeta left23:04
venmx joined23:04
weijin joined23:04
venmx left23:07
newbie|7 left23:08
\void left23:09
weijin left23:09
ecuanaso left23:10
ddda_ joined23:10
KeyJoo joined23:11
ddda_ left23:11
xaxxon left23:12
cagomez joined23:12
kn-928 left23:12
Jitta joined23:14
xaxxon joined23:15
dedondesta left23:15
IanLiu left23:17
weijin joined23:17
raffo left23:17
mikado left23:17
\void joined23:18
nixjdm left23:19
threenuc left23:20
threenuc joined23:20
Phylock left23:20
akushner joined23:20
Kaisyu joined23:21
denimsoft joined23:21
schleppel left23:22
weijin left23:22
renken left23:23
dviola joined23:23
UTAN_dev_ left23:24
_ikke_ left23:25
dege left23:25
sweeterss joined23:27
hbautista_ left23:29
Bonjourm8_ joined23:29
weijin joined23:31
_ikke_ joined23:32
Bonjourm8 left23:32
zaayer joined23:33
UTAN_dev_ joined23:34
gitinfo set mode: +v23:34
weijin left23:35
ecuanaso joined23:36
johnflux joined23:37
johnflux left23:37
johnflux joined23:37
shpoont left23:38
cdg_ left23:39
rain1 joined23:42
rain1 hi23:42
Kaisyu7 left23:43
Bonjourm8_ left23:43
Kaisyu7 joined23:44
Bonjourm8 joined23:44
Bonjourm8 left23:45
Bonjourm8 joined23:45
kneeki left23:46
durham joined23:49
weijin joined23:51
nivag left23:51
_ikke_ left23:52
durham_ left23:54
durham left23:54
weijin left23:55
RougeT430 joined23:57
_ikke_ joined23:58

Logs Search ←Prev date Next date→ Channels Documentation