Perl 6 - the future is here, just unevenly distributed

IRC log for #git, 2016-08-23

| Channels | #git index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 mingrammer joined #git
00:03 jaequery joined #git
00:04 Raed|Laptop joined #git
00:06 nitric joined #git
00:10 harish joined #git
00:13 Rodya_ joined #git
00:14 l4v2 joined #git
00:19 pikajude joined #git
00:19 pikajude joined #git
00:25 linuxmint joined #git
00:29 HoierM joined #git
00:29 nullie joined #git
00:31 Manuel15 joined #git
00:31 Manuel15 joined #git
00:31 vassagus joined #git
00:32 SwiftMatt joined #git
00:34 gargola joined #git
00:40 MattMaker joined #git
00:46 fuchstronaut joined #git
00:46 cwali joined #git
00:47 JamesBaxter joined #git
00:48 atomicb0mb joined #git
00:49 MattMaker joined #git
00:51 tesuji_ joined #git
00:51 arescorpio joined #git
01:04 Vampire0_ joined #git
01:04 DieguezZ joined #git
01:08 wilhelmtell joined #git
01:08 sgrover joined #git
01:10 frivol joined #git
01:10 MattMaker joined #git
01:10 sgrover Looking for any tips/gotchas on how best to handle this.  Master branch last updated in Dec 2015.  Many changes to the develop branch that are now being abandoned.  How best to handle this scenario while maintaining history, but resetting develop to match master?
01:10 sgrover git revert?
01:10 drawkula joined #git
01:11 sgrover or just checkout develop - drop in all files from the master branch, and then new commit?  Or another method?
01:11 wilhelmtell sgrover: is master in develop's ancestry?
01:11 mingrammer joined #git
01:11 sgrover yes
01:12 wilhelmtell is it a server, or your personal repo?
01:12 sgrover develop originally branched from master.  Client's repository (Fortune 500 company...)
01:12 i7c Abandoning changes -> just make a new branch off of master and forget "develop".
01:13 i7c That would be my solution. :)
01:13 wilhelmtell sgrover: is this a personal repo? or a server that people pull from?
01:13 sgrover i7c: that would require altering ALL of the auto-deploy stuff.
01:14 sgrover Production website pulls from master branch.  Staging website pulls from develop branch.  Devs pull from Develop to their own private repo.  Only authorized devs are allowed to commit to develop (I'm one of em)
01:16 wilhelmtell okay. so develop is published. do you want to abandon everything in develop since master, or just a few of the commits?
01:17 sgrover just back to the last time master was updated.  I have the specific commit hash.
01:17 sgrover but there are 20+ commits after that point.
01:17 ojacobson sgrover: do you literally use `git pull` from inside automatic deployment processes?
01:17 mmlb joined #git
01:18 ojacobson because that's a disaster waiting to happen in exactly this circumstance
01:18 sgrover ojacobson: no.  It's a Jenkins fetch, then we rsync the workspace to the destination.
01:18 ojacobson ah, so fetch + checkout
01:18 ojacobson carry on
01:18 wilhelmtell ok. because develop is published, you probably don't want to reset it. unless, you don't mind apologizing to the other developers, because a reset will cause them a headache
01:19 wilhelmtell sgrover: your next option is to revert to master. this means you're going to push one commit that reverts those 20+ commits on develop since master.
01:19 karrtmomil joined #git
01:19 sgrover ojacobson: can you elaporate on this issues (as an aside) - I'm about to set up another system where git pulls is the "easy way"
01:19 sgrover wilhelmtell: All the pertinent devs know we are about to do a reset.  There are only a few of us...
01:19 wilhelmtell sgrover: $ git checkout develop && git revert master..
01:20 beyertech joined #git
01:20 wilhelmtell sgrover: okay, sure. the difference between a reset and a revert, is that revert maintains develop's history. reset doesn't.
01:20 sgrover wilhelmtell: That's what I was thinking, but I read that as reverting a specific commit and not the later ones...
01:21 wilhelmtell sgrover: if you reset, you'll get a few days of grace, with the commits in the reflog. once the default grace period is over (90 days last i checked. or maybe 30? can't remember. 30-90 days), once the grace period is over, the next git gc (which is done automatically by some commansd) will prunt these develop commits you reset over.
01:22 wilhelmtell sgrover: revert can take a single hash, or range
01:22 wilhelmtell sgrover: you'll notice my command was $ git revert master..
01:22 ojacobson sgrover: how do you plan to have your robot handle merge conflicts, basically
01:22 ojacobson `git pull` runs `git merge` for you, so conflicts are necessarily a case you have to plan for
01:23 sgrover hmm... these guys make changes at a glacial pace.  a 30 to 90 day grace period may not be sufficient - they might next touch this site a year from now and pick up right where they left off.
01:23 wilhelmtell sgrover: the two periods mean a range. master.. is equivalent to master..HEAD which in turns means all the commits starting at master, not including master, all the way to HEAD, including HEAD.
01:24 sgrover sry, missed the ..
01:24 wilhelmtell ojacobson: there shouldn't be any conflicts, IIUC. the only possible conflicts are, for example, if developer Bob has local changes, you push the revert, and then Bob pulls. Then, Bob's local changes might conflict with the revert.
01:25 ojacobson wilhelmtell: that was specifically in response to a question about using `git pull` for automatic deployment
01:25 i7c The definition is actually "everything reachable from HEAD but not from master", which is slightly different.
01:25 ojacobson in that scenario, "shouldn't" is a pretty weak guarantee.
01:25 ResidentBiscuit joined #git
01:26 jon-mac joined #git
01:26 wilhelmtell If you want to avoid conflict, you can tell developers you plan on reverting between 13:00 and 14:30, so they should make sure they commit before then and not have local changes in this period. but really, that's unproductive. the real answer is, stop being afraid of conflicts. they're nothing to be afraid of. they're part of live. just resolve them like the warrior you are. :)
01:26 Dougie187 joined #git
01:26 tsia joined #git
01:27 wilhelmtell sgrover: when i say grace period, i'm talking about the reflog. see $ git reflog --help
01:27 wilhelmtell it has a grace period for pruning. the manpage explains everything.
01:27 wilhelmtell git reflog is essentially your recycle bin, that auto-empties old refs.
01:27 wilhelmtell old and dangling i mean.
01:28 sgrover ojacobson: thanks.  Our workflow handles conflicts before the pushes, OR the conflict is a change we want to know about.  But noted - will likely do a fetch/checkout then.
01:28 i7c I dont’t quite get it. First they say the branch is abandoned, now they’re afraid of conflicts because people still work on those branches? o_O
01:28 sgrover i7c - two different projects.
01:28 i7c oh ok
01:28 i7c Didn’t read carefully enough then. :x :)
01:28 sgrover I wanted more details for the second project which was planned to use pulls
01:29 sgrover wilhelmtell: thanks for the revert refresher.  Luckily I get to try this out on my working copy first.. :)
01:29 sgrover And thanks all for the great support!!
01:30 JamesBaxter joined #git
01:30 wilhelmtell sgrover: absolutely. you do that locally first, then if you wish announce the push, and then push.
01:31 eric7750 joined #git
01:31 eric7750 left #git
01:32 vassagus joined #git
01:34 sgrover wilhelmtell: so just to confirm the commands I'd want would be: git checkout develop; git revert abcdef..HEAD;  (where the abcdef would be the hash of the commit where develop was last merged to master... right?)
01:35 sgrover hmm.. is this zero based or one based - i.e. does abcdef also get reverted, or it only handles everything after that one...  (just running the command would tell me what I need to know, I know.. :) )
01:38 diprotic joined #git
01:40 cqi joined #git
01:45 rewt sgrover, usually in A..B, A is not included in the list
01:45 mikecmpbll joined #git
01:47 fuchstronaut joined #git
01:50 rj1 joined #git
01:50 alphor joined #git
01:50 sgrover thanks rewt
01:51 beyertech joined #git
01:51 griffindy joined #git
01:52 sgrover It's never simple.  The reverts are failing because there are merges involved (from the working copies to the central copy).  And I can't revert the merges enmass because there are regular commits involved.  So.. a little a time it seems.
01:52 beyertech joined #git
01:52 hahuang61 joined #git
01:53 rewt make a list of the commits you want to revert, and give them all to git revert
01:54 frivol to revert a merge you need that -m , usually with a 1.  Never understood how to decide which integer was correct.
01:56 sgrover Just read through that.  http://www.christianengvall.se/undo-pushed-merge-git/ sort of explains it in a reasonable way.
01:56 msafi joined #git
01:56 Thorn joined #git
01:57 rewt when you merge A into B, what was B is 1, and A is 2 ... 1 is where the branch was, and 2,etc are the other branch(es) merged in
01:57 msafi If I commit a big file to git, and then remove it, my git repo will be big right forever right? Is there a way to delete that file from history so that my git repo isn't big because of it?
01:58 frivol rewt, makes sense.
01:58 pks joined #git
01:58 hgdfgsafdgf joined #git
01:58 rewt msafi, see first example in man git-filter-branch
01:58 gitinfo msafi: the git-filter-branch manpage is available at http://jk.gs/git-filter-branch.html
01:59 Thorn__ joined #git
02:00 MattMaker joined #git
02:00 JamesBaxter joined #git
02:00 msafi Thank you, rewt!
02:03 d^sh joined #git
02:04 ytl joined #git
02:05 Goplat joined #git
02:06 mingrammer joined #git
02:06 HoierM joined #git
02:08 snowkidind joined #git
02:10 MattMaker joined #git
02:13 mostlybadfly joined #git
02:14 kuldeep joined #git
02:16 nydel07 joined #git
02:16 dodobrain joined #git
02:18 Zimmedon_ joined #git
02:27 lagothrix joined #git
02:31 sandroqz joined #git
02:31 gargola joined #git
02:32 jaequery joined #git
02:33 hexagoxel joined #git
02:33 vassagus joined #git
02:34 MattMaker joined #git
02:36 diphtherial joined #git
02:37 diphtherial not really sure where to ask about this, but i'm using git for windows and have gcc installed, yet python packages still insist on looking for and failing to find vcvarsall.bat
02:37 diphtherial any idea how that can be remedied, assuming this is the right place to ask?
02:40 Vaelatern joined #git
02:41 RedneckDonut joined #git
02:43 wilhelmtell joined #git
02:43 diphtherial ah, figured it out; thanks anyhow
02:43 diphtherial left #git
02:45 NeverDie joined #git
02:45 Zimmedon joined #git
02:47 fuchstronaut joined #git
02:48 cyan__ joined #git
02:48 zivester joined #git
02:50 lolka joined #git
02:51 dodobrain joined #git
02:51 rchavik joined #git
02:52 fstd_ joined #git
02:52 akison joined #git
02:53 Hink joined #git
02:53 wilhelmtell left #git
02:54 harish joined #git
02:59 chachasmooth joined #git
03:00 rkazak joined #git
03:03 aavrug joined #git
03:05 aavrug joined #git
03:06 bronson_ joined #git
03:08 Vaelatern joined #git
03:09 dreamyspell joined #git
03:14 red_ joined #git
03:17 Vaelatern joined #git
03:20 mingrammer joined #git
03:20 Raed_ joined #git
03:22 hahuang61 joined #git
03:25 Dougie187 left #git
03:26 mehola joined #git
03:28 danimal2 joined #git
03:36 mehola joined #git
03:37 durham_ joined #git
03:41 mehola joined #git
03:42 mehola joined #git
03:44 mgoodwin Is there a way, or a flow to have 'less serious commits' for certain branches - The problem I'm having is that I've learned that it can be rather difficult to go back and change commit messages and rebase and all that so I commit less because I don't ... well, want to "commit". Yet, sometimes I just want to leave my changes uncommitted on a branch, but you can't really do that either
03:45 MattMaker joined #git
03:47 chrisshattuck joined #git
03:51 chrisshattuck joined #git
03:55 MattMaker joined #git
03:55 cyphase joined #git
04:00 thecomedian joined #git
04:04 chrisshattuck joined #git
04:05 aidalgol joined #git
04:10 mehola joined #git
04:10 hahuang61 joined #git
04:14 mgoodwin https://sandofsky.com/blog/git-workflow.html ah, i just read this and that clarifies some better options
04:14 Cabanossi joined #git
04:14 MattMaker joined #git
04:15 M-shine joined #git
04:16 Andrew_K joined #git
04:17 woodruffw joined #git
04:18 woodruffw joined #git
04:18 woodruffw joined #git
04:19 woodruffw joined #git
04:23 eka joined #git
04:24 SwiftMatt joined #git
04:24 chrisshattuck joined #git
04:28 mehola joined #git
04:30 a_thakur joined #git
04:30 _ikke_ mgoodwin: When working with topic branches, you can come back later and fix everything in the topic branch before it gets merged back
04:30 _ikke_ mgoodwin: See !perfect and !sausage
04:30 gitinfo mgoodwin: [!postproduction] So, you want to make your commit history look pretty before pushing? http://sethrobertson.github.com/GitPostProduction talks you through how to use 'rebase -i' to do this.
04:30 gitinfo mgoodwin: [!sausage_making] Some developers like to "hide the sausage making", transforming their commits before presenting them to the outside world. See http://sethrobertson.github.com/GitBestPractices/#sausage and !perfect
04:30 thiago joined #git
04:31 mgoodwin Yeah, i'm pretty well versed with interactive rebase
04:31 mgoodwin Unfortunately I use it a lot
04:31 mehola joined #git
04:32 mgoodwin I seem to spend as much time in interactive rebases as I did in development
04:32 mgoodwin The pre/during-commit habits are were I'm going wrong, I think
04:32 cdown joined #git
04:33 _ikke_ mgoodwin: What also helps is to make logical commits, that are easy to describe instead of "updating some stuff"
04:35 vassagus joined #git
04:41 MattMaker joined #git
04:41 mgoodwin Here's my most recent stuff: https://github.com/RocketChat/Rocket.Chat.Ansible/commits/master and this was after 20+ hours of interactive rebasing to clean things up
04:41 mgoodwin I just feel like i'm doing something wrong
04:42 mgoodwin Or maybe I'm not respecting that I made a lot of little changes that _should_ be documented
04:42 mgoodwin Not sure
04:42 Vaelatern joined #git
04:43 Manuel15 joined #git
04:43 Manuel15 joined #git
04:44 north joined #git
04:45 north Hi. After I made changes to my git repo and doing git add, I accidentally did a git checkout -- folder. All my changes are gone now. I sthere a way I can retrieve the changes back ?
04:47 cdown joined #git
04:49 ShapeShifter499 joined #git
04:49 fuchstronaut joined #git
04:50 mgoodwin if you added them to the index you can find them with fsck
04:50 mingrammer joined #git
04:50 mgoodwin git fsck --unreachable --lost-found
04:51 mgoodwin write a script around that maybe to output those into files and read through them
04:52 Finnoloid joined #git
04:59 phanimahesh joined #git
05:00 freimatz joined #git
05:03 jaafar joined #git
05:05 subhojit777 joined #git
05:06 chrisshattuck joined #git
05:10 ochorocho__ joined #git
05:11 kuldeep joined #git
05:11 jceb joined #git
05:16 k3rn31 joined #git
05:16 cdown joined #git
05:17 k3rn31 left #git
05:17 leeN joined #git
05:21 _sjs joined #git
05:24 Remram[m] joined #git
05:24 Ineentho[m] joined #git
05:24 M-mistake joined #git
05:24 M-meznak joined #git
05:30 hendry joined #git
05:30 vdv joined #git
05:31 hendry is it possible to set certain environment variables with a checkout of git repo?
05:36 vassagus joined #git
05:37 thiago no
05:38 thiago that's not how environment variables work
05:42 Marlinski joined #git
05:42 Marlinski hello
05:42 gitinfo Marlinski: 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.
05:42 Raging_Hog joined #git
05:43 Marlinski I have an issue with a git submodule. I added a submodule libA to be put in place of libs/libA and I also put a file there called libA that containt Subproject commit commit1. However I would like to change the commit number but the file doesn't exist anymore as it was written over by the git submodule directory of same name
05:44 Marlinski how can I update the gitsubmodule commit number ?
05:44 bocaneri joined #git
05:45 mingrammer joined #git
05:48 qt-x joined #git
05:49 a_thakur joined #git
05:50 fuchstronaut joined #git
05:53 Corosus joined #git
05:54 ljc joined #git
05:55 pvinis joined #git
05:56 pvinis how can i always ignore a file when merging branches?
05:56 mgoodwin http://hastebin.com/isilalineh @ hendry
05:56 mgoodwin Don't use that ;x
05:56 satya4ever joined #git
05:56 pvinis i found that i can use git attributes and ours, but that only applies if the file has conflicts
05:57 pvinis is there a way to just ignore a file from merges?
05:57 mehola joined #git
05:57 Rish joined #git
05:57 pvinis so i can only change it with a commit on the current branch
05:57 mgoodwin hendry: oh, that would be a post-checkout hook btw, chmod +x too
06:02 AndreSomers joined #git
06:06 smithbone joined #git
06:19 jknetl joined #git
06:19 JeroenT joined #git
06:19 jknetl joined #git
06:20 cyan__ joined #git
06:21 jknetl joined #git
06:22 pvinis can i ignore a file during merging?
06:25 _ikke_ pvinis: no
06:25 hendry left #git
06:25 pvinis aha..
06:25 pvinis so there is no way to do that? except manually every time..?
06:25 _ikke_ The only way is to use git merge -n, and manually reverse the file
06:25 _ikke_ yes
06:26 _ikke_ These are so called evil merges
06:26 pvinis can i do it in a hook or something?
06:26 _ikke_ And they're called evil for a reason
06:26 pvinis mm
06:26 pvinis can i tell you the use case and maybe you have a better idea about how to do it?
06:27 _ikke_ sure
06:27 jtprog_ joined #git
06:28 pvinis we have about 4 different builds of a product, with a few different features. so each build is made from a different branch
06:28 xaa joined #git
06:28 pvinis and in there somewhere, we have a file that is the manifest about which features should be turned on or off
06:28 laidback_01 joined #git
06:29 pvinis the problem is, when we add a new feature, or edit the way a feature works, or enable a feature in one branch, and then merge that stuff to another branch, we want to merge all the changes/fixes/etc, but keep the features as they are. no turning on and off
06:30 _ikke_ branches are not meant for this
06:30 pvinis that has to be made manually.
06:30 pvinis why now?
06:30 _ikke_ Don't use branches to differentiate between features or environments
06:30 pvinis its like master as stable, then a beta branch, an experimental, and a specialized
06:30 _ikke_ Exactly for this reason
06:30 pvinis hm
06:31 pvinis so how would you suggest we do that?
06:31 _ikke_ pvinis: Yes, but the idea of branches is that they will eventually be merged completely back
06:31 pvinis we have to have different builds
06:31 pvinis so if not branches, what do we use then?
06:31 circ-user-cmOBz joined #git
06:32 timvisher joined #git
06:32 _ikke_ You can have a stable branch and a dev branch etc, but don't rely on files to have different contents between those branches
06:33 _ikke_ so the easiest sollution would be to have a file per environment in each branch
06:33 _ikke_ and the build system would pick the file for that environment
06:33 _ikke_ not sure if that's possible
06:33 pvinis by environment you mean the "stable", "beta", etc?
06:35 mgoodwin You should have a default config checked into git and then use `git update-index --skip-worktree <file>` and/or bonus points, manage the config with a config management suite like ansible
06:36 _ikke_ tricks with update-index to solve these kind of problem always cause more problems than they solve
06:36 mgoodwin ¯\_(ツ)_/¯
06:36 mgoodwin works in a pinch
06:37 GodEater` left #git
06:37 _ikke_ pvinis: and yes, that's what I mean
06:37 GodEater joined #git
06:37 _ikke_ pvinis: but the premise is that beta will eventually become stable
06:37 pvinis hm..
06:38 pvinis yea, but we always have the beta
06:38 smithbone joined #git
06:38 pvinis we merge it to stable, but then we have new things in beta
06:38 pvinis ans we have some specialized branches that are running in parallel with the stable
06:38 mgoodwin But I agree with _ikke_, you should version control the configs and store them adjacent, and then configure it to use one config or the other, and build the application to read _that_ config outside of version control, or in a place skipped by the worktree
06:38 pvinis thats the problem
06:38 pvinis hm..
06:38 pvinis alright
06:39 pvinis i will look into that
06:39 pvinis maybe while building, we give some parameters
06:39 pvinis and that helps to determine what gets turned on and off
06:40 _ikke_ pvinis: exactlly
06:40 mgoodwin Yeah if it's literally being built and not a web app, use the build environment vars
06:44 alansaul joined #git
06:45 freimatz joined #git
06:50 JeroenT joined #git
06:50 fuchstronaut joined #git
06:51 Macaveli joined #git
06:51 JeroenT joined #git
06:52 bjoernh joined #git
06:54 GavinMagnus joined #git
06:56 Macaveli joined #git
06:56 roelmonnens joined #git
06:56 Sceorem joined #git
06:57 mrkake joined #git
06:58 ToxicFrog joined #git
06:59 jtprog_ joined #git
07:00 djb-irc joined #git
07:00 Rish_ joined #git
07:06 watersoul joined #git
07:06 submitnine joined #git
07:07 shennyg joined #git
07:08 Hounddog joined #git
07:09 Mowgli joined #git
07:09 zerox2a joined #git
07:10 Mayumi joined #git
07:11 MajorPayne joined #git
07:12 TomyWork joined #git
07:12 eka joined #git
07:13 Darcidride joined #git
07:15 eka joined #git
07:15 encod3 joined #git
07:16 sebboh joined #git
07:16 GavinMagnus joined #git
07:17 albel727 joined #git
07:17 bjoernh left #git
07:19 DevAntoine joined #git
07:21 GavinMagnus left #git
07:22 rcn joined #git
07:23 linuxmint joined #git
07:24 a_thakur joined #git
07:25 l4v2 joined #git
07:32 LucaTM joined #git
07:33 mingrammer joined #git
07:34 mohabaks joined #git
07:35 stuh84 joined #git
07:37 evanwang joined #git
07:39 lordjancso joined #git
07:39 Emperor_Earth joined #git
07:49 tsia joined #git
07:51 fuchstronaut joined #git
07:52 fractalizator joined #git
07:52 Zoxc joined #git
07:53 spriz joined #git
07:53 ldlework How can I move a single change within a commit from one commit to another?
07:53 ldlework I am okay at rebasing at the commit level, but how can I actually move individual changes around?
07:54 Vaelatern cherry-pick?
07:54 MattMaker joined #git
07:54 ldlework I don't know I'm asking :)
07:54 ldlework Vaelatern: to my understanding cherry-pick moves whole commits between branches?
07:54 circ-user-cmOBz joined #git
07:55 Balliad joined #git
07:55 osse ldlework: you need to split the source commit into two commits
07:56 osse are the two commits you want to manipulate in sequence?
07:56 aax joined #git
07:56 ldlework osse: nope
07:56 ahmedelgabri joined #git
07:56 ldlework I basically just want to drag a given blob/narrowly-scoped-change ahead to a commit that comes a few later
07:58 osse ldlework: rebase -i then split the source commit into two. rebase -i again and move the split out part next to the other and squash
07:58 ldlework osse: I split it with the "edit" operation?
07:58 osse ldlework: to split up, mark the source commit as 'edit'; then do git reset HEAD; git add ...; git commit twice
07:58 ldlework crazy
07:58 osse I mean git reset HEAD~
07:58 ldlework not HEAD^ ?
07:59 osse HEAD~ = HEAD^
07:59 ldlework lol ok
07:59 GavinMagnus joined #git
07:59 ldlework osse: you're always very helpful thank you
07:59 t0by joined #git
08:02 p4trix joined #git
08:02 jtprog_ joined #git
08:02 hahuang61 joined #git
08:02 mahendra_ joined #git
08:04 mikecmpbll joined #git
08:04 abyx joined #git
08:04 a_thakur joined #git
08:05 kurkale6ka joined #git
08:05 abyx joined #git
08:06 tobiasvl he hails from a helpful people
08:07 ljc joined #git
08:08 shirty joined #git
08:11 marcogmonteiro joined #git
08:13 donnib joined #git
08:13 mrkake joined #git
08:13 donnib Hi guys
08:13 frogonwheels_ joined #git
08:13 maxorator joined #git
08:14 abyx joined #git
08:14 donnib i am using LFS and i recently changed branch to a branch before i enabled git LFS and now i have a one binary file (we only have one) that is stuck in the working directory which i can't get rid og
08:14 donnib *of
08:14 donnib in any way
08:14 donnib i tried git checkout -- file and still the file remains modified
08:14 donnib i tried git reset hard
08:14 donnib nothing can remove the file, i really don't want to clone again
08:14 donnib any ideas what to do ?
08:15 abyx joined #git
08:18 _ADN_ joined #git
08:22 abyx joined #git
08:24 ASOLAr joined #git
08:25 Macaveli joined #git
08:25 JeroenT joined #git
08:25 Thorn__ joined #git
08:26 abyx joined #git
08:27 linuxmint joined #git
08:28 harish joined #git
08:29 devxom joined #git
08:30 chll_ joined #git
08:32 abyx joined #git
08:34 jceb joined #git
08:35 i7c donnib, you want to delete the file? git rm path/to/file; If you just want to untrack it but keep the file in the working dir git rm --cached path/to/file
08:37 ferr joined #git
08:39 vassagus joined #git
08:40 robotroll joined #git
08:40 alansaul joined #git
08:41 Macaveli joined #git
08:44 ASOLAr joined #git
08:47 Matsv joined #git
08:48 ahmedelgabri joined #git
08:51 intellix joined #git
08:52 fuchstronaut joined #git
08:54 mingrammer joined #git
08:55 MattMaker joined #git
08:56 Manuel15 joined #git
08:56 Manuel15 joined #git
08:56 Jonuz I'm using mac and I have mounted samba host, how do I add remote repo from that mount? I tried git remote add file://Volumes/asd/repot.git but git just says thre is no git repo
08:58 i7c Gotta give it a name.
08:59 wxg joined #git
08:59 i7c git remote add myremote <url>
08:59 jab416171 joined #git
08:59 Ezzy joined #git
08:59 i7c !man git-remote
08:59 gitinfo The git man pages are available online at http://jk.gs/git.html. Or were you looking for the "man git-foo" syntax(without the !) ?
08:59 gitinfo the git-remote manpage is available at http://jk.gs/git-remote.html
08:59 fakenerd joined #git
08:59 moei joined #git
08:59 Jonuz Ah, sorry, I did git remote add origin file:/Volumes/asd/dsa.git
09:00 ams__ joined #git
09:01 i7c Dunno about the file: thing there, can’t find it in the manpage. I just do git remote add derp /local/path
09:02 Jonuz I have tried that as well :¶
09:02 i7c Jonuz, what’s the exact error message you get?
09:02 tsia joined #git
09:02 Jonuz fatal: Not a git repository (or any of the parent directories): .git
09:02 i7c Ah
09:03 i7c You are running the command while you’re not currently in any git repository.
09:03 i7c Has nothing to do with the remote location.
09:03 Jonuz hahah
09:04 antiRNM joined #git
09:04 Jonuz yeah, that was the problem, thanks
09:04 i7c You’re welcome. :)
09:05 konrados Morning :)
09:05 DJ_Spies joined #git
09:06 antiRNM left #git
09:07 DJ_Spies joined #git
09:09 Darcidride joined #git
09:09 konrados I had a question yesterday, how can I ignore a file, but in the same moment have it in repo. I've learned, that's impossible (unless I use git update-index --assume-unchanged but some say it is not for this purpose). OK, so I get it, but... why? Why can't I just tell Git to not care about a file being modified? What's the reason Git and SVN work in this way? Is there any article which would explain me this? I just see no reason...
09:09 stop-psychiatry joined #git
09:09 DJ_Spies joined #git
09:11 Mowgli joined #git
09:11 Jonuz That would be handy for config files in public project
09:12 Macaveli joined #git
09:12 osse konrados: the main reason is probably that no one has bothered implementing it yet
09:12 Guest55 joined #git
09:12 Ooooooooooo joined #git
09:14 Seveas Jonuz: no, it would be disastrous for config files.
09:14 konrados That's strange osse, nobody had a problem with config files, which locally must be different than on repo? I know the "solution" - keeping two configs, where one (local) overwrites the default one, but still, Git is a very sophisticated peace of software, I can imaging this would be simple comparing t the rest of the soft o_O
09:15 Seveas konrados: because ignoring and tracking at the same time makes no sense whatsoever.
09:15 osse konrados: say you actually need to make a change to this ignored file. you commit it and push it. others pull. what happens?
09:16 DJ_Spies joined #git
09:16 osse Seveas: no sense whatsoever? isn't that a bit harsh? I mean the factoid exists for a reason.
09:17 jceb joined #git
09:17 Seveas osse: nope, it's like asking rain to be dry. "I want it to rain but not get wet"
09:17 osse i don't believe you
09:17 i7c lol
09:18 konrados Well, we very rarely modify config files, and if we do, we discuss it, it's not that I simply push it, and tell nobody about it. But thanks, I see the reason. Thank you too Seveas, Jonuz :)
09:18 Seveas How does "I want git to track this file but not track my changes" make any sense?
09:18 Seveas Dry rain makes more sense :)
09:18 osse Seveas: because of the whole config issue
09:18 Seveas osse: !xy :)
09:18 gitinfo osse: Woah, slow down for a bit. Are you sure that you need to jump through that particular hoop to achieve your goal? We suspect you don't, so why don't you back up a bit and tell us about the overall objective...
09:18 osse fucking hell
09:19 MattMaker joined #git
09:19 Seveas that's doing config files wrong.
09:19 osse Seveas: yes I know there are easy ways around it. I spew the config factoid all the time
09:19 fakenerd joined #git
09:19 osse but saying that the naive way makes "no sense whatsoever" is just stupid
09:19 Seveas it's not 'ways around it'
09:19 osse EWHATEFC#crta5re34q
09:19 osse whatever
09:19 osse you know what i mean
09:20 osse I fully agree with you on a techincal level. What I take issue with is the "no sense whatsoever" part.
09:21 Seveas We'll have to agree to disagree then. To me it doesn't make any sense.
09:21 osse You can't even fathom how it would be in any way even a little bit desirable at all?
09:21 selckin maybe he lives in a world where hes always working alone
09:21 osse You think people just dream this up out of nowhere?
09:22 Seveas selckin: quite the contrary, it's working in a huge production environment that's shown me that "config files don't go in the same repo as the code" is not just "working around a limitation"
09:23 osse maybe I have a stricter interpretation of what "make sense" means
09:23 bschindler joined #git
09:23 AnarchyAo joined #git
09:23 AnarchyAo joined #git
09:23 AnarchyAo joined #git
09:24 konrados I'm sorry I started this "fight" :)
09:24 AnarchyAo joined #git
09:24 AnarchyAo joined #git
09:24 i7c Don’t be. It’s the grumpy old people’s fault here!
09:24 Seveas :)
09:24 Seveas i7c: get off my lawn, whippersnapper!
09:24 osse Seveas: you say it comes from experience?
09:25 i7c It'll just take a second until they think of the common enemy (SVN) again and they’ll tear it apart hand in hand, don’t you worry.
09:25 Seveas osse: if with "it" you mean my hatred of the config files xy issues, then yes.
09:25 rominron_ joined #git
09:26 selckin then don't help them and move on with your day
09:26 roelmonn_ joined #git
09:26 osse Seveas: ok, that pretty much confirms our differences in what "make sense" means.
09:26 robotrolll joined #git
09:26 ahmed_elgabri joined #git
09:26 mar77i joined #git
09:27 konrados I'll try to ask another question :)
09:28 konrados I did git rm --cached on one file, and how to "undo" it? On SO I found this: git reset (--hard) HEAD~1 but doesn't it undo the last commit?
09:28 Seveas git checkout HEAD -- file
09:28 LebedevRI joined #git
09:28 konrados sec...
09:29 osse git status tells you how to
09:29 a_thakur joined #git
09:29 courrier joined #git
09:30 LebedevRI hi! question about format-patch: is there any way to make it add the same msg like cherry-pick -x does?
09:31 konrados joined #git
09:32 konrados Morning again, I got disconnected. Seveas, osse - thanks again!
09:32 Ciblia joined #git
09:33 Seveas LebedevRI: it's kinda in there already in the mbox From line at the top.
09:34 Nothing4You joined #git
09:34 Seveas LebedevRI: a quick scan of the manpage shows no option that's equivalent to cherry-pick's -x, but you could write something that postprocesses the patch files and copies the info in the From line to a message trailer
09:35 LebedevRI hm, i need it for slightly different reason - i have git tree1 and git tree2, and tree2 bundles tree1 in tree2/external/tree1, so i will use format-patch on tree2, and then send changes to tree1
09:35 LebedevRI and i would like to preserve some link to original commit
09:35 LebedevRI and yes, i know about submodules
09:37 moei joined #git
09:37 albel727 joined #git
09:37 MattMaker joined #git
09:37 MatthewAllan93 joined #git
09:38 sebboh joined #git
09:38 MatthewAllan93 joined #git
09:39 alansaul joined #git
09:40 xvzf joined #git
09:40 Mowgli joined #git
09:41 toogley joined #git
09:41 omegak joined #git
09:41 xvzf hi there, I set git config --global core.autocrlf true, still, when I use git archive --remote=url master path | tar xvf -    I get files with only LF, not CRLF. What should I do to make git archive emit CRLFs at line endings?
09:44 bongjovi joined #git
09:46 averell assuming i'm merging, and I did git checkout --ours file, how can i revert that and get the mixed file?
09:46 MattMaker joined #git
09:48 Seveas xvzf: a quick browse of the sourcecode tells me that archive doesn't care about core.autocrlf, you may have more luck using the .gitattributes system
09:50 i7c Mhm I noticed that on zsh (on several distros) git doesn’t complete the subtree command, but using bash it works. Afaiu the zsh completion uses the bash completion, any hint why that wouldn’t work?
09:52 wxg joined #git
09:52 phanimahesh joined #git
09:53 jast AFAIK zsh ships its own completion for git
09:53 fuchstronaut joined #git
09:53 i7c Oh ffs
09:53 i7c you’re right
09:53 jast you could try the zsh completion included in git's repo in contrib/completion/
09:54 i7c Another 7k line script. *sigh*
09:54 jast it's only 225 lines ;)
09:54 i7c Yeah, that was the one I was looking at. I just assumed it was the one in use.
09:55 jast I'm not sure how up-to-date it is, though
09:56 jast no changes in 1.5 years :/
09:56 i7c Well it somehow parses git help -a and probably does other things too, I'm not quite sure.
09:59 mingrammer joined #git
10:00 mingrammer joined #git
10:00 i7c Ok lol if I use the one shipped with git, it doesn’t complete my aliases anymore.
10:00 i7c That’s just silly.
10:01 osse The zsh completion has been a point of contention
10:01 osse At least it was. The one shipped with git is less accurate but faster than the one shipped within zsh
10:03 i7c "faster" is misleading if you consider that it does less.
10:03 konrados Somebody here told me that everything git needs for a project is stored in the .git directory of a project. But then what this mean: "Since Git clones keep the working directory (where you edit files) separate from the repository data, there is only one..." ( https://help.github.com/articles/support-for-subversion-clients/ )  )
10:03 hahuang61 joined #git
10:03 i7c It might take less ms to show/complete a result, but you also are slower because you have to do more yourself.
10:04 AndroIRCScreens joined #git
10:06 osse yes, that's the contention. which is best?
10:06 osse it's subjective
10:06 osse anyway, the contention I think was mostly on zsh's mailing list, not git's.
10:06 Sceorem joined #git
10:07 osse i7c: it might be worth grabbing _git from the zsh repo. it has received updates since the latest release
10:07 AndroIRCScreens joined #git
10:07 i7c Okay, I’ll compare versions later. :)
10:08 osse konrados: what don't you understand about it?
10:08 Lornzer joined #git
10:08 osse long story short: you can only have one branch checked out at a time
10:10 choki joined #git
10:11 Lornzer i accidentaly amended my latest local commit to the previous one instead of making it a separate, new commit, causing the git log --reflog status to output the wrong date / message for the latest entry
10:11 Lornzer what's a newbie friendly way to fix that? :o
10:11 osse Lornzer: git reset --soft HEAD@{1}
10:12 AndroIRCScreens joined #git
10:12 osse i7c: DRAMA! http://www.zsh.org/mla/workers/2013/msg00396.html
10:12 Lornzer will that make me lose any changes of the latest commit?
10:13 osse no
10:13 Lornzer <3
10:13 Lornzer awesome! thanks
10:13 konrados osse This I understood, but if I have project named xyz in directory xyz does git keep anything, about this project, outside xyz/.git ?
10:14 tobiasvl no
10:14 wxg joined #git
10:14 Lornzer git log --reflog still contains the amended commit information though - will this show up when i push the new commits upstream?
10:15 osse no
10:15 Lornzer great
10:15 Lornzer thanks a lot for the quick help!
10:17 osse i7c: dramaaaaaa http://www.zsh.org/mla/workers/2011/msg00490.html
10:18 osse Lornzer: git log --reflog will show a bunch of crap because of amend and rebase etc etc.
10:18 konrados tobiasvl, this was to me?
10:18 osse but that's not the proper history of the repo. git log --reflog shows the *reflog*, aka. the "oh shit heeelp" log. it is info only local to the repo.
10:18 mehola_ joined #git
10:19 xvzf Seveas: thanks indeed, editing .gitattributes helped a lot
10:19 tobiasvl konrados: it was to you, yes
10:19 tobiasvl konrados: everything concerning the repo is in .git
10:20 i7c osse, oh lord.
10:20 osse i7c: https://marc.info/?l=git&amp;m=136645084712859&amp;w=2
10:20 osse aren't we having fun!
10:22 i7c osse, I wonder if it was ever considered to make the completion an internal thing and shells just call git-complete <anything> or so.
10:23 i7c Internal is a funny term in a tool that’s so scattered, ok.
10:23 i7c But I meant completing without any bash/shell features involved.
10:23 i7c Shouldn’t be that hard to write.
10:23 osse i7c: One problem would be that different shells have different ways of implementing completion
10:24 i7c Could be handled with a shallow script like the zsh one now.
10:24 i7c Just passes $* to the internal command.
10:24 konrados thanks tobiasvl!
10:24 osse $* ?? "$@" please! Think of the children!
10:24 i7c I have to look up those everytime.
10:24 i7c :D
10:25 i7c Just like all the $< $@ whatevers in makefiles. Horrible.
10:25 osse /msg greybot !$*
10:25 chachasmooth joined #git
10:25 i7c Oh, useful.
10:26 pro_metedor joined #git
10:27 pro_metedor Im trying to rebase my feature branch on develop, but when I resolve conflicts I am missing files either from my or develop branch
10:27 _ikke_ What kind of files?
10:27 _ikke_ And why do you expect them to be there?
10:28 pro_metedor my code files created on feature branch
10:29 ochorocho__ joined #git
10:29 pro_metedor what im trying to achieve is single line of commits before I’ll make pull request
10:30 _ikke_ pro_metedor: You know that rebase is applying commits one by one? So files created in later commits may not be applied yet
10:30 tobiasvl yeah, pro_metedor, did you continue the rebase after resolving a conflict?
10:31 pro_metedor well id like my branch to start at current develop head
10:31 pro_metedor and apply changes from there
10:31 pro_metedor I aborted it as I saw that files are missing, I may try to continue on other copy
10:32 rahtgaz joined #git
10:32 eka joined #git
10:33 JeroenT joined #git
10:35 JeroenT joined #git
10:36 pro_metedor well, I have finished rebase, and it works as expected
10:36 eijk joined #git
10:37 pro_metedor erm.. wrong, it is missing files form develop again
10:38 circ-user-cmOBz joined #git
10:38 _ikke_ And they weren't deleted in the feature branch?
10:39 bremner git log -- missing-file
10:39 sdothum joined #git
10:40 spudowiar joined #git
10:42 stuh84 joined #git
10:46 noidea joined #git
10:48 Bizkit joined #git
10:52 anticom joined #git
10:54 fuchstronaut joined #git
10:54 krs93_ joined #git
10:54 ThomasLocke joined #git
10:54 ThomasLocke joined #git
10:56 pro_metedor no response
10:56 pro_metedor git log -- missing-file gives me no response
10:57 osse how about git log --all -- missing-file
10:57 bremner and "git log develop -- missing-file" ?
10:57 bremner or that
10:57 pro_metedor I just resolved conflict on project file using „mine” and all develop branch files are present, some of feature branch files are present and some are missing - those in subdirectories
10:58 NicholasAsimov joined #git
11:00 osse is the rebase complete?
11:02 cwali joined #git
11:02 Stace joined #git
11:02 Stace Is there any way of doing a diff between the head of a branch and the point where the branch left the master?
11:03 osse Stace: git diff master...abranch
11:03 osse ez for git
11:03 Stace or do I have to calculate how back it left and use ~n?
11:03 Stace ooh, cool
11:03 osse Stace: note three dots, not two.
11:03 JeroenT joined #git
11:03 Stace that's great, thanks!
11:04 osse Stace: the waters get muddied if there are merge commits between master and your branch after the initial creation of the branch
11:05 Stace osse: what if I do a rebase on the branch?
11:05 Stace (it's a local one only)
11:05 Stace then it should use the new branching point, correct?
11:05 osse yes
11:05 osse after a rebase the point where branch left master is equal to master itself
11:05 osse that's the point of a rebase
11:06 Stace oh, right
11:06 krs93 joined #git
11:06 Stace but I guess if they diverge further then it would be relevant
11:06 mgoodwin Three dots can be confusing though
11:06 osse yes, until you rebase again
11:06 mgoodwin Beware that it's the commits that differ between both refs
11:07 mgoodwin Not what differs between tips (i.e. actual code)
11:07 mgoodwin Which would be two dots
11:07 mgoodwin (Or no dots)
11:07 Stace yes, that's what I want
11:08 * osse shakes fist at the people who made git diff foo..bar = git diff foo bar
11:08 Stace because if I just use diff master branch, I get all the changes on both
11:08 Stace but I want just what the one branch changed relative to where it started
11:10 Stace it's a bit silly that one . can make such a big diff
11:11 Stace also, cherry-pick is marvellous
11:12 a3Dman joined #git
11:13 krs93_ joined #git
11:13 encod3 joined #git
11:14 psprint Can you pass user and password to git push other than via URL?
11:16 lb1c psprint with https protocol?
11:18 Macaveli joined #git
11:19 lb1c man gitcredentials or http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password
11:19 gitinfo the gitcredentials manpage is available at http://jk.gs/gitcredentials.html
11:20 fuchstronaut joined #git
11:20 ljc joined #git
11:21 Manuel15 joined #git
11:21 Manuel15 joined #git
11:23 Guest55 joined #git
11:24 JeroenT joined #git
11:29 ljc joined #git
11:30 ahmed_elgabri joined #git
11:31 stamina joined #git
11:31 Ragnor joined #git
11:31 rnsanchez joined #git
11:33 mohabaks joined #git
11:34 nedbat "git describe --tags" will show me the tag I am on (or descended from), but if my current commit has a number of tags, can I see all of them somehow?
11:35 encod3 joined #git
11:37 nedbat seems like "git log -1 --format='%d' " will get the info, which I could awk/sed/something, but I'm wondering if there's a smoother way
11:38 kyan joined #git
11:40 osse nedbat: git tag --merged
11:40 nedbat osse: hmm, that includes both the tags on this commit, but also ancestor tags
11:41 nedbat osse: oh:   git tag --points-at @
11:41 keller joined #git
11:42 JeroenT joined #git
11:43 nedbat and: git tag --contains @    # not sure of the difference
11:46 Steele joined #git
11:48 SpecChum joined #git
11:49 JeroenT joined #git
11:50 paws_ joined #git
11:52 krs93 joined #git
11:52 al-damiri joined #git
11:54 fahadash joined #git
11:55 d0nn1e joined #git
11:55 osse nedbat: what's the problem with showing the tag on this commit? that's what git describe would have done
11:56 nedbat osse: i have commits with multiple tags, and need to see them all.
11:56 tomog999_ joined #git
11:57 osse yes..
11:57 osse you said "hmm, that includes both the tags on this commit, but also ancestor tags". But isn't this exactly what you wanted?
11:57 osse OOOOOOOOOOHHHHHHHHHHHHHHHHHHHHH
11:57 osse never mind
11:57 nedbat :)
11:57 osse ez for for-each-ref
11:58 linuxmint joined #git
11:58 Sceorem joined #git
11:58 osse but --points-at does what you wanted? sounds like it should
11:58 nedbat osse: yes, it does.
11:58 osse \o/
11:59 nedbat and I think --points-at and --contains look identical because I am looking at leaf commits
11:59 osse yes, exactly
11:59 lordjancso joined #git
11:59 osse if you do  git checkout HEAD~34345345 or do git tag --contains HEAD~34345345 there will be a big difference
11:59 nedbat osse: that's a big repo!
11:59 osse then ti will show later tags also
12:00 anuxivm joined #git
12:01 cyphase joined #git
12:02 fuchstronaut joined #git
12:02 fuchstronaut joined #git
12:03 infra-red joined #git
12:03 Hounddog joined #git
12:05 hahuang61 joined #git
12:08 a_thakur joined #git
12:11 a_thakur joined #git
12:13 cmosguy is there a way to implment a pre-commit hook without having to edit anything in the .git directory.  Is there a way to check in a file that commands a pre-commit action or script??
12:16 Seveas no
12:18 osse The former is possible but not the latter, I think
12:18 osse using git config --global core.hooksPath
12:18 osse But it doesn't sound like a smart thing to do
12:18 jimi_ joined #git
12:19 Seveas is core.hooksPath in a release yet?
12:19 Rish joined #git
12:19 Seveas ah, it's in 2.9.0
12:20 cmosguy Seveas: it's just that if you are working with a team it would be nice to actually check in a file that enforces a pre-commit action and then makes all the developers in project contributing use this same pre-commit hook action
12:21 Seveas cmosguy: as a security measure nothing in a repository may cause arbitrary code to be executed
12:21 Seveas s/$/ when doing normal git operations, like cloning or committing/
12:22 Ozd left #git
12:22 XiaoMianTiao joined #git
12:23 osse for a system that is as widely used as git it would be fairly dangerous
12:23 synthroid joined #git
12:23 osse one might even say it makes no sense whatsoever
12:23 daniel_rose joined #git
12:23 Seveas I would agree :) Though I can see the usefulness of being able to manage pre-commit hooks somewhat centrally.
12:24 Seveas then again, pre-commit hooks can't be relied on for checking things, as they're easily bypassed. pre-receive hooks in your central location are better there.
12:24 johnmilton joined #git
12:24 Seveas Making pre-commit hooks a convenience that should be made easy to set up
12:25 cmosguy hmm.... ok
12:25 MattMaker joined #git
12:26 Seveas cmosguy: a way of doing this is shipping a hooks/ directory and letting people copy the hooks into their .git/hooks (or even symlink them if they like living dangerously)
12:26 cmosguy Seveas: yes i was thinking the same thing
12:28 Seveas we ship a post-checkout hook that way, which does javascript minification
12:29 johnmilton joined #git
12:29 f0rblaze joined #git
12:32 tjone270_ joined #git
12:33 sanketdg joined #git
12:33 charlespl joined #git
12:34 osse whyyy
12:34 osse oh, checkout.
12:34 charlespl Hello, provided I am on development branch I did some merges than i switch to master branch and did some changes as well. Now I want to pull from origin/master all changes and apply them to development branch how can I achieve it?
12:35 cmn joined #git
12:36 CheckDavid joined #git
12:36 Freze joined #git
12:36 Seveas charlespl: git checkout development; git pull origin/master
12:37 charlespl thanks
12:37 jceb joined #git
12:37 Seveas osse: yeah, not pre-commit. That would make absolutely no sense :D
12:37 Endarked joined #git
12:38 dsdeiz joined #git
12:38 dsdeiz joined #git
12:39 weox joined #git
12:39 user083 joined #git
12:40 fees joined #git
12:41 cmosguy Seveas: i created a .git/hooks/pre-commit file but it is not getting executed when i do a commit
12:42 osse is it executable?
12:42 cmosguy yes
12:42 osse how do you know it's not executed?
12:42 cmosguy bit i am in windows
12:43 cmosguy $ ll .git/hooks/pre-commit
12:43 cmosguy -rwxr-xr-x 1 kleinada 1049089 797 Aug 23 05:22 .git/hooks/pre-commit*
12:43 osse what's in it?
12:43 jeffreylevesque joined #git
12:45 ash_workz joined #git
12:47 cmosguy https://gist.github.com/cmosguy/b1e44f3484a5b8d92b5ab9866771b1b8
12:47 cmosguy i think i need to execute bash .git/hooks/pre-commit or something?
12:47 cmosguy or will git for windows execute git-bash for me?
12:48 Seveas is there a /usr/bin/env on that system? If not, just put the path to bash in the shbang
12:51 dvaske joined #git
12:51 tlaxkit joined #git
12:52 cmosguy when the hook runs does it run from the .git directory? or does it run from within the folder of the hooks?
12:52 cmosguy i am going to add a line that does bash ../../../pre-commit--hook.sh
12:52 zivester joined #git
12:52 cmosguy is there a way to test this?
12:52 cmosguy without checking in things?
12:53 JamesBaxter joined #git
12:54 osse cmosguy: the current working dir of the hook will be the top levle of the repo
12:54 osse you can use commit --amend over and over
12:56 cmosguy can you guys remind me how to fix this stupid issue: https://gist.github.com/cmosguy/6cf7eed6f872efc28d10704da482c711
12:56 cmosguy I got my commit hoks working now
12:56 cmosguy but after I run it this is what I get
12:57 Emperor_Earth_ joined #git
12:57 Emperor_Earth__ joined #git
12:58 beyertech joined #git
12:58 jost__ joined #git
12:58 a_thakur joined #git
12:59 aaaaa joined #git
12:59 alansaul joined #git
13:00 ExoUNX joined #git
13:01 PioneerAxon joined #git
13:03 GodGinrai joined #git
13:04 Khisanth joined #git
13:09 DevAntoine joined #git
13:10 Trefex joined #git
13:10 Trefex hi. i have the strangest thing ever
13:10 inflames joined #git
13:10 Trefex when i push to my remote, it asks for a password on a completely different and unrelated IP
13:11 cdg joined #git
13:15 anuxivm left #git
13:15 Akimb joined #git
13:16 fmcgeough joined #git
13:16 jimi_ joined #git
13:17 gajus can anyone explain me why the tag doesn't get pushed?
13:17 gajus https://travis-ci.org/gajus/gitinfo/jobs/154449241#L393
13:17 tabrez joined #git
13:19 osse where is the tag created?
13:19 gajus it looks like the `git commit --amend --no-edit` is messing it up somehow
13:19 pampeho joined #git
13:20 osse if the tag is created before that line then the tag is not reachable from master, thus won't be pushed when you push master
13:20 rkazak joined #git
13:20 gajus I see.
13:22 cdown joined #git
13:25 cdown_ joined #git
13:25 fakenerd joined #git
13:27 adac joined #git
13:27 cwali joined #git
13:27 adac is there a common naming scheme for branches or is this somthing that is/should be totally free to chose?
13:28 gajus the closest thing to what you are asking is – read about gitflow
13:28 tobiasvl !flow
13:28 gitinfo [!gitflow] The description of the gitflow branch workflow model is at http://nvie.com/posts/a-successful-git-branching-model/ while a tool to help implement this workflow is at https://github.com/petervanderdoes/gitflow  See http://sethrobertson.github.com/GitBestPractices/#workflow for other workflow suggestions/references
13:30 Remram[m] joined #git
13:30 Remram[m] joined #git
13:30 adac thanks gajus!
13:30 mmlb joined #git
13:31 creeep joined #git
13:31 Guest55 joined #git
13:33 tvw joined #git
13:33 Rodya_ joined #git
13:36 lmat I'm using git fetch --all; and it's asking for my username and password for each remote.
13:36 lmat I have keys handy, and I have my public key on the server. Is there another step I need to take to tell the git client to use public key authentication?
13:36 osse lmat: git remote -v
13:36 osse what does it say
13:37 lmat origin https://github.... (fetch)     origin https://github....  (push)
13:37 lmat the normal stuff :-)
13:37 osse you cannot use ssh keys whe nyou don't use ssh
13:37 lmat osse: genius! Thanks!
13:37 GodGinrai https doesn't use ssh keys
13:38 konrados Hello again. Does git svn require the .svn directory? I know I could check it, but something's wrong with our svn server.
13:38 rnsanchez_ joined #git
13:38 diprotic joined #git
13:38 diprotic joined #git
13:40 Sharedex joined #git
13:41 Sharedex left #git
13:42 anonymuse joined #git
13:42 AaronMT joined #git
13:43 vassagus joined #git
13:43 AaronMT joined #git
13:46 JeroenT joined #git
13:47 intransit joined #git
13:48 Dougie187 joined #git
13:49 Trefex left #git
13:51 selckin joined #git
13:51 rahtgaz joined #git
13:51 selckin joined #git
13:52 selckin joined #git
13:53 irco joined #git
13:53 interrobangd joined #git
13:54 kaldoran joined #git
13:54 boombatower joined #git
13:54 zivester joined #git
13:55 MattMaker joined #git
13:57 TooLmaN joined #git
13:59 thiago joined #git
14:00 JanC_ joined #git
14:00 kpease joined #git
14:01 snowkidind joined #git
14:04 ResidentBiscuit joined #git
14:04 phaleth joined #git
14:06 cdown joined #git
14:06 Endarked_ joined #git
14:06 hahuang61 joined #git
14:06 le_melomane joined #git
14:06 jceb joined #git
14:07 shymega joined #git
14:07 kadoban joined #git
14:08 cdown_ joined #git
14:09 shinnya joined #git
14:09 kbs joined #git
14:12 harleyyyyymayes /msg nickserv identify Hunter2
14:13 axl_ joined #git
14:14 madewokherd joined #git
14:14 gajus :+
14:14 ivan_on_trac joined #git
14:15 delboy1978uk joined #git
14:15 a_thakur joined #git
14:15 delboy1978uk git branch -D whatever.
14:15 atomicb0mb joined #git
14:15 delboy1978uk so how do i do that on my remote?
14:15 Hink joined #git
14:15 gajus git push origin :whatever
14:15 ivan_on_trac I did a fix and submit the current branch....  As I just picked up this file and sends it to another branch?
14:18 mingrammer joined #git
14:18 axl_ joined #git
14:18 delboy1978uk thanks gajus
14:21 axl_ joined #git
14:21 pro_metedor joined #git
14:21 cdown joined #git
14:23 unbalancedparen joined #git
14:24 kappy joined #git
14:24 mr_quincy joined #git
14:25 Lornzer joined #git
14:25 axl_ left #git
14:26 Anupkumar I am getting an error, while, I am trying to push my local changes to the master:
14:26 Anupkumar https://www.irccloud.com/pastebin/1mEJSWEW/
14:26 Lornzer help! :O
14:26 mivanov joined #git
14:26 Lornzer i created a new local branch with checkout -b , did some stuff and now wanted to add a remote (not yet existing) branch as upstream
14:27 Lornzer $ git branch -u origin feature/reuse-sslcert                                                                 [16:24:11]
14:27 Lornzer Branch feature/reuse-sslcert set up to track remote branch master from origin.
14:27 LebedevRI left #git
14:27 Lornzer how can i revert the madness? (i.e. undo the upstream add and do it again, but with remote branch feature/reuse-sslcert instead of master?)
14:28 jas4711 joined #git
14:28 delboy1978uk left #git
14:30 jtprog_ joined #git
14:30 le_melomane joined #git
14:32 lmat When I run git log --all --decorate; I see lots of remote branches that I don't care to see. How do I change which branches are downloaded to my local repo?
14:32 lmat I'm *not* seeing local tracking branches :-)
14:32 lmat like    oriign/devel  origin/feature1 origin/oldbranchsomething   etc. I just want origin/master and origin/devel.
14:33 le_melomane joined #git
14:34 mikecmpb_ joined #git
14:34 dmto joined #git
14:34 NicholasAsimov joined #git
14:35 ash_workz joined #git
14:35 eivarv joined #git
14:37 cyan__ joined #git
14:37 vassagus joined #git
14:38 fahadash joined #git
14:38 mivanov left #git
14:38 mivanov joined #git
14:38 foist joined #git
14:40 lmat So I guess I'm looking for a retroactive  git remote add -t;  something like    -t master  -t devel;
14:40 lmat So that the other branches aren't downloaded at all (I think that's how that works).
14:41 lmat OH yeah!  set-branches!
14:42 abyx joined #git
14:45 lmat not working..   I did git remote set-branches origin master devel;  then   git log --all --decorate; shows lots of origin branches that I don't want.
14:45 jguillen joined #git
14:46 harleyyyyymayes /msg nickserv identify Hunter2
14:46 harleyyyyymayes oop
14:46 harleyyyyymayes oops
14:46 KevinMGranger har de har har
14:46 lmat harleyyyyymayes: /win 1  first ;-)
14:46 harleyyyyymayes ;)
14:47 Anupkumar how can I pull the changes which are in a branch to my local machine ?
14:47 lmat Anupkumar: git fetch --all;
14:48 kadoban harleyyyyymayes: The same joke over and over stops being funny, especially when there's real content in the channel.
14:49 Anupkumar lmat: when I do that, it is not fetching the branches on the remote
14:49 osse harleyyyyymayes: don't let the haters get you down
14:49 lmat Anupkumar: git branch --list -vv; should show what local branches you have. Make sure there is a local branch tracking the remote you want.
14:49 harleyyyyymayes osse: :)
14:50 al-damiri joined #git
14:50 lmat osse: Did you see my earlier question? I know you know ;-)
14:51 osse lmat: you can use --branches instead of --all. or  simply do git log ... {list of branches here}
14:51 osse git log master devel feature bugfix
14:51 ikt joined #git
14:52 osse look up what --all and --branches mean
14:52 lmat osse: What does git remote set-branches do? And git remote add -t?
14:52 osse i've no idea
14:53 ochorocho__ joined #git
14:53 lmat I just did   git remote remove origin; and I *still* see the unwanted branches! :-)  I'm guessing there's some pruning that I need to do.
14:53 osse yes, that won't automaically delete them
14:53 osse not really sure what the proper way of doing it is. I use git update-ref -d
14:54 lmat hmm
14:55 Eryn_1983_FL joined #git
14:55 lmat wow... where are these things defined?
14:56 rgrinberg joined #git
14:56 GhettoJava joined #git
14:58 rpd lmat: git help remote?
14:58 lmat So now I'm wondering, after   git remote remove origin; how do I get rid of all the  origin/branchname s in my git log --all --decorate!
14:59 spudowiar joined #git
15:00 zivester joined #git
15:00 subhojit777 joined #git
15:02 hiroki I'm in the process of figuring out how GIT submodules work (just for the fun of it). What i'm noticing is that once I commit in a submodule, the parent repo changes 'Subproject commit <hash>, which is something I would need to commit on the parent repo. I'm wondering if there are options available where I can update submodule repositories without incurring changes to the parent repo that I would need to commit.
15:02 hiroki Any tips / pointers ?
15:02 fuchstronaut joined #git
15:02 grawity hiroki: there aren't; this is basically how submodules work
15:02 grawity the parent repo mainly remembers them by commit ID
15:03 subhojit777 joined #git
15:03 Guest55 joined #git
15:04 roelmonnens joined #git
15:04 hiroki grawity: I see. How do people generally deal with this in automated environments ? Let's say a situation where both the parent repo as well as the submodule repo's should only be 'fetched + reset --hard origin/master + clean -d -f -f' to make sure pulling in changes always reflects the latest commit in GIT ?
15:05 lmat hiroki: git submodule --for-each 'reset command here';   or something like that
15:05 hiroki grawity: Ah, I figured that information might be possible to fetch from the submodule repo's .git folder. Any developments going on to alter this behaviour or is it a design decision ?
15:05 rpd hiroki: you'd probably have to run git submodule update
15:05 intellix joined #git
15:05 grawity there are some semi-recent options for tracking a branch, I think
15:06 hiroki lmat: rpd thanks, going to look into that !
15:06 hiroki grawity: Yeah I think I read something about that, but seemed to have lost that page in the forest of tabs..
15:06 grawity though the commit thing probably will never go away (it's the core of submodules), but things like `git pull` can be smarter about it
15:07 griffindy joined #git
15:08 hiroki hmm, right. I'm looking for a possible implementation where both main + submodule repo's are shallow (depth=1) and read-only (on the receiving end/machine)
15:10 jaafar joined #git
15:11 ToBeCloud joined #git
15:12 BeerSerc joined #git
15:13 l4v2 joined #git
15:13 Spec-Chum joined #git
15:13 GhettoJava joined #git
15:14 morenoh149 joined #git
15:14 yonatankoren joined #git
15:17 lvns_ joined #git
15:20 InfoTest joined #git
15:21 daniel_rose joined #git
15:22 daniel_rose joined #git
15:22 hahuang61 joined #git
15:22 phanimahesh joined #git
15:23 intellix joined #git
15:23 madewokherd joined #git
15:24 rominronin joined #git
15:26 abyx joined #git
15:28 abyx joined #git
15:29 mohabaks joined #git
15:30 joki- joined #git
15:30 kpease joined #git
15:32 intellix joined #git
15:34 kpease joined #git
15:36 ahmed_elgabri joined #git
15:38 synthroid joined #git
15:39 kpease joined #git
15:40 pioiytr joined #git
15:42 crayon joined #git
15:42 dendazen joined #git
15:42 crayon joined #git
15:43 jaafar joined #git
15:44 intellix joined #git
15:44 Kicer86 joined #git
15:47 ahmedelgabri joined #git
15:51 atomicb0mb joined #git
15:53 alansaul joined #git
15:54 Macaveli joined #git
15:54 EvilPeng1 joined #git
15:55 wilhelmtell joined #git
15:56 p3m joined #git
15:56 LionsMane joined #git
15:58 jstein_ joined #git
16:00 intellix joined #git
16:03 fuchstronaut joined #git
16:03 Es0teric joined #git
16:03 runlevl4 joined #git
16:05 thiago joined #git
16:05 davisonio joined #git
16:06 nitric joined #git
16:06 davisonio joined #git
16:06 pmalyanne joined #git
16:12 intellix joined #git
16:12 leeN joined #git
16:14 Guest40098 joined #git
16:15 __shymega__ joined #git
16:17 Corosus joined #git
16:18 OnOut2k16 joined #git
16:19 rafalcpp joined #git
16:20 pmalyanne joined #git
16:21 Derperperd joined #git
16:21 __shymega__ joined #git
16:26 Literphor joined #git
16:26 rominronin joined #git
16:26 durham joined #git
16:27 Guest55 joined #git
16:28 chrisshattuck joined #git
16:29 aca20031 joined #git
16:29 creeep joined #git
16:30 netcarver joined #git
16:30 nitric_ joined #git
16:30 mjuszczak joined #git
16:31 mjuszczak joined #git
16:32 mjuszczak joined #git
16:34 Muzer joined #git
16:34 cjohnson Ok I'm definitely still lost on rebasing from master. I started a totally new branch from master yesterday, and I have only made raw commits to my branch, no merging whatsoever
16:35 cjohnson So I pushed my commits this morning, and then I ran a rebase from master. it complained that remote and local had diverged, so I ran a pull
16:35 intellix joined #git
16:36 zacts_pi joined #git
16:36 cjohnson that refreshed everything, but now when I do a git log master..mybranch, I'm getting all sorts of commits showing up that didn't come from my branch
16:36 cjohnson and github shows the same, and when I do a compare, I see the changes from those other commits
16:37 zacts_pi joined #git
16:37 cjohnson I know for sure the only other dev didn't do any force pushes. I can see where his commits are in master, but they have different commit ids
16:37 djh joined #git
16:37 cjohnson what are we doing wrong to cause this?
16:37 anonymuse joined #git
16:38 Dougie187 cjohnson: Just so you know, a `pull` is also `merge`
16:38 kadoban cjohnson: What's "a rebase from master"? Why did you do that? What did you want to happen?
16:38 kadoban And that ^
16:38 Dougie187 cjohnson: Graph plz? :P
16:38 cjohnson Dougie187: git pull --rebase
16:38 kadoban It sounds like you changed history and then merged in the old history or something.
16:38 Rodya_ joined #git
16:38 Dougie187 cjohnson: Do you know what `git pull --rebase` does?
16:39 cjohnson I'm guessing not :D
16:39 Gsham joined #git
16:39 Dougie187 cjohnson: Have you looked at the graph when you're rebasing?
16:39 cjohnson no. what's the command I should run for the graph?
16:39 Dougie187 !lol
16:39 gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all
16:39 Dougie187 You can leave off the `--all` if it's too noisy.
16:39 stonercoder joined #git
16:39 cjohnson from my branch/
16:39 cjohnson ?
16:39 Dougie187 But you'd want something like: `git log --oneline --graph --decorate <branch> origin/master`
16:40 Dougie187 To see the graph of your branch relative to master.
16:40 Dougie187 cjohnson: If you use --all, it will show you all branches.
16:40 sebboh joined #git
16:40 Dougie187 cjohnson: If you run it when without --all, and without specific branches, it uses HEAD as the place it'll show you
16:40 cjohnson gotchya
16:40 cjohnson https://i.imgur.com/jJDzXQZ.png
16:41 Dougie187 In my experience, this is the most useful command for figuring out what other commands are actually doing.
16:41 cjohnson so for example aff2b68 is a commit that comes from master, whereas d9868ab  is a commit I just made to my branch
16:41 AnarchyAo joined #git
16:42 rkazak joined #git
16:42 AnarchyAo joined #git
16:42 Dougie187 cjohnson: So, it looks like aff2b68 was rewritten at some point
16:42 Dougie187 So that when you rebased, it picked it up.
16:42 cjohnson right, in master, the commit id for that commit is fbc...
16:42 Dougie187 So, to be clear, you want a branch off of 68e9f29, that contains which commits?
16:42 cjohnson I wrote that commit in another feature branch
16:43 cjohnson then I merged that feature branch into master
16:43 kuldeep joined #git
16:43 cjohnson and now this morning I've run `git rebase master` from feature/migration  so I can be sure my migration branch is up to date
16:43 cjohnson is that wrong?
16:43 Dougie187 Well, you're moving commits you don't want to move around.
16:44 cjohnson I keep thinking I want to do that to avoid headaches come merge-time but it seems to constantly cause headaches
16:44 Dougie187 I'd recommend when you do `git rebase master` to always use `git rebase -i master`
16:44 shmoon left #git
16:44 Dougie187 Then you get a chance to look at what it's going to do before it does it.
16:44 lacrymology joined #git
16:44 cjohnson ok I will do that
16:44 Dougie187 So, what I would suggest doing, is this:
16:44 Dougie187 `git rebase -i 229df4d`
16:44 Dougie187 Then delete any commits from that list that shouldn't be there
16:44 lacrymology I have a conflict pre-solved by rerere and I'd like to resolve it. I'm in the middle of the rebase right now.. is it possible, or do I have to abort+forget+re-rebase?
16:44 Dougie187 and look at the graph again
16:45 Dougie187 cjohnson: Make sense?
16:45 diphtherial joined #git
16:45 diphtherial git for windows SDK seems to cause no end of trouble
16:46 diphtherial i wish there was a channel for that specifically, as i know the vast majority of you don't use windows
16:46 zacts joined #git
16:46 cjohnson Dougie187: so my local branch has 3 commits that belong to this branch. for all the other commits I should change the entry to drop ?
16:46 Dougie187 No, just delete the lines.
16:47 cjohnson oh ok
16:47 GhettoJava joined #git
16:47 kbs joined #git
16:47 cjohnson ok so I did that and ran the graph command again and now it looks kinda right: https://i.imgur.com/CH2QiSu.png
16:48 cjohnson I have a hard time telling what the lines actually mean
16:48 cjohnson but the 3 commits at the top are the only 3 commits that belong here
16:48 cjohnson git log master..feature/migration shows only my 3 commits. now I should git rebase -i master  to see what it's going to do
16:49 Dougie187 Yes
16:49 ahmedelgabri joined #git
16:49 ShekharReddy joined #git
16:50 cjohnson Ok, before I do that, I think I should force push this state to github
16:50 cjohnson this is a branch nobody else uses
16:50 cjohnson I already pushed after I did that rebase before
16:50 cjohnson sound logical?
16:50 Dougie187 Sure, that's fine
16:51 Dougie187 That's usually what I do, just to back things up.
16:51 armin joined #git
16:51 creta joined #git
16:52 cjohnson Ok, I ran git rebase -i master, and only my three commits showed up :/
16:52 Dougie187 Should be good
16:52 cjohnson ok here's where I think I screwed up
16:52 daynaskully joined #git
16:52 cjohnson it now says my branches have diverged
16:52 cjohnson I ran a pull when I saw this last time
16:53 cjohnson which was git pull --rebase
16:53 cjohnson https://i.imgur.com/1lJ2nfJ.png
16:54 aard_ joined #git
16:54 ochorocho__ joined #git
16:54 cjohnson and remember that I just did a force push on origin/feature/migration from my "good state"
16:55 Dougie187 What's the graph look like?
16:56 dreiss joined #git
16:56 cjohnson running `git log --oneline --graph --decorate feature/migration origin/master`: https://i.imgur.com/o8o2fmn.png
16:57 cjohnson my commit IDs have changed I see
16:57 hahuang61 joined #git
16:58 Dougie187 Yes, that's a side effect of rebasing
16:58 Dougie187 But that looks fine
16:58 cjohnson so why do I get diverged history?
16:58 Dougie187 Because you haven't pushed your updated version of it.
16:58 Guest55 joined #git
16:58 Dougie187 You just rebased, so of course your history has diverged.
16:58 Dougie187 Here, do this
16:58 Dougie187 (it will help you understand)
16:59 cjohnson thanks so much for your help
16:59 Dougie187 `git log --oneline --graph --decorate feature/migration origin/feature/migration`
16:59 Dougie187 Those are what it says have diverged btw. Not your branch and origin/master
16:59 cjohnson right
16:59 freimatz joined #git
17:00 Dougie187 Make sense?
17:00 HoierM joined #git
17:00 creeep joined #git
17:01 Dougie187 You should be able to clearly see the divergence in that plot at least.
17:01 cjohnson yeah, I can see the commits listed in each side of the tree
17:01 cjohnson with original commit IDs in the other branch
17:01 cjohnson so what do I do now? I have a diverged history, git push is rejected
17:02 cjohnson git pull is what got me into the state I was in earlier
17:02 Sasazuka joined #git
17:04 themayor joined #git
17:05 fuchstronaut joined #git
17:05 GavinMagnus left #git
17:06 Dougie187 cjohnson: you'll need to force push, just like you did last time.
17:06 Dougie187 Typically, whenever you rebase, you need to force push. But you need to make sure you're going to get what you want after the fact (and not mess up other people)
17:07 cjohnson Ok so I think that brings me back to whether my premise is just faulty. is it wrong for me to want to refresh my feature branches from time to time, so I'm working from an updated code base?
17:07 cjohnson seems like to do that requires me to force push, which isn't a good idea?
17:07 AnarchyAo joined #git
17:08 AnarchyAo joined #git
17:08 AnarchyAo joined #git
17:08 AnarchyAo joined #git
17:08 SporkWitch cjohnson: why would you have to force push? merge the changes in locally, resolve the conflicts if present, then push normally...
17:08 AnarchyAo joined #git
17:08 cjohnson My workflow currently is: branch from master, do work, do work, git rebase master to refresh, do work, merge into master
17:08 nullie If nobody else uses these branches it's OK to force push
17:09 cjohnson So instead of rebase, if I want to play nicely with others, I should merge master into my branch?
17:09 cjohnson the issue then is when I go to merge my branch back in, it shows all sorts of commits that aren't part of my branch
17:11 AnarchyAo joined #git
17:11 skylite joined #git
17:11 Dougie187 cjohnson: If you're the only developer on the branch, rebasing + force pushing is fine.
17:11 SporkWitch cjohnson: i see what you're saying, it's because you're rewriting history on the remote.  This is why you create a private fork of the repo to work on.  You don't do these operations directly on the upstream repository.  Since it's your private working copy, you can rewrite history all you want, you aren't affecting anyone else
17:11 Dougie187 cjohnson: if other people are working on the same branch, you don't want to rebase / force push without talking to them first.
17:11 SporkWitch so you'd force-push to your repo, but you're doing a pull-request to merge your branch back into the upstream
17:11 Dougie187 ^^
17:12 cjohnson we work at the same company, doesn't seem like a whole fork should be necessary?
17:12 Oeo joined #git
17:13 fished joined #git
17:13 SporkWitch you should ALWAYS be working on your own copy of the repository, NEVER directly on the upstream.  Yeah, git's decentralized and such a hierarchical model is frowned upon by purists, but really, NO ONE follows that purely decentralized model.  Even the linux kernel project, at the end of the day, has a handful of mirrors that are authoritatively the master
17:13 fished joined #git
17:13 SporkWitch to do work you fork, do what you need, rebase to clean things up, then submit a pull request to have your stuff merged upstream
17:14 cjohnson SporkWitch: I thought localbranch vs origin/remotebranch accomplished that
17:14 SporkWitch cjohnson: not if you're pushing to the remote it doesn't.  The whole point is that you have your own working copy that's JUST yours, no one pulls from it.
17:14 cjohnson I see
17:14 Darcidride joined #git
17:14 * kbs suspects a concept impedance mismatch :)
17:15 SporkWitch cjohnson: the only way something should go into the upstream branch is via pull-request.  The only thing you should ever be pushing into is a personal copy; all other times, pulls are preferred.
17:15 SporkWitch kbs: care to elaborate ?
17:16 fished joined #git
17:16 cjohnson We are using pull requests but w'ere just doing it from feature -> develop/master
17:16 Dougie187 cjohnson: A fork is really just like a backup of your local repo, to stage changes before they make it into the upstream.
17:16 kbs cjohnson: is there an remote feature branch that people use sort of like a code-review tool? (actually, do you use  github, maybe?)
17:17 cjohnson we use github yes
17:17 Dougie187 If you make a fork, you can mess around with it a lot easier.
17:17 cjohnson I'm just confused because there are two IT teams with two projects, and they seem to get along just fine with PRs that don't show foreign code changes, and none of them have forks of the repo
17:17 Dougie187 cjohnson: You don't need to submit from a fork if you don't want to.
17:17 cjohnson Until recently I was a one-man show so I didn't really run into these issues but now I've got a partner
17:18 nanga joined #git
17:18 Dougie187 But you can force push whatever you want to a fork.
17:18 Groscheri joined #git
17:18 cjohnson yeah I just did a force push on my branch
17:18 Dougie187 And after it looks how you want, you can normal push to the shared repo.
17:18 dviola joined #git
17:18 SteffanW joined #git
17:18 cjohnson I think maybe that's all I need to do. rewrite history on my features only, knowing my partner doesn't touch my branches, and force push when I do so
17:18 Dougie187 Another way you can do the same thing as force pushing is just use local branches. And instead of pushing to backup, make a backup branch
17:18 nanga joined #git
17:18 cjohnson in the past I would see "diverged" and assume I just need to pull
17:18 cjohnson and that would screw it up
17:18 Dougie187 cjohnson: Honestly, the other thing I recommend to people is never do `git pull`.
17:19 InfoTest1 joined #git
17:19 cjohnson what do you suggest instead? also it's git pull --rebase in my alias. is that an issue?
17:19 Dougie187 Personally, I hate that command because it's two things and people generally don't think about what it's acutally doing.
17:19 cjohnson yep I definitely overlook it a lot
17:19 Dougie187 cjohnson: I'd recommend doing `git fetch` to update your history, and then either `git merge` or `git rebase` based on what you want to do.
17:19 cjohnson ok
17:19 davisonio joined #git
17:19 Dougie187 There are some workflows where `git pull` is just fine. But it hides a lot of details and causes a lot of issues for people.
17:20 sebboh joined #git
17:20 cjohnson ok so let's say I complete my work on my branch. I merge it into master
17:20 Dougie187 cjohnson: but to be fair, that's my personal experience / opinion. I think there are other people who would advocate for `git pull`
17:21 cjohnson at this point if I want to make any future changes I should make a new hotfix branch? and not touch the original
17:21 nwkj86 joined #git
17:21 Dougie187 cjohnson: What I typically do (again you're able to do whatever you want) is once I submit a PR for my branch, I delete my local branch.
17:21 cjohnson ok
17:21 Dougie187 Then, if I need to make modifications to the remote branch (for the PR) I use detached heads.
17:22 Dougie187 As part of satisfying our PRs, we *always* delete the remote branches.
17:22 Dougie187 So, a new feature would be a new branch after that. And if you need to fix issues in your original branch you would just make a new branch off of the commit that introduced the bug.
17:22 Dougie187 But neither of those require anything special.
17:23 cjohnson right, makes sense. ok, I think I have a better grasp of things now. I'm sure I'll come back tomorrow having screwed it up again but for now...
17:23 Dougie187 :P
17:23 cjohnson thanks again everybody for all your help. I can't believe I've been using git for this long and these things still escape me
17:24 daniel_rose joined #git
17:24 Dougie187 cjohnson: NP. Rebase is easily one of the more confusing things for people to grasp.
17:24 choki joined #git
17:24 Dougie187 I'm *very* anal about verbage for rebase to help people make sense of what's going on.
17:25 Dougie187 So you should always think of rebase as `I'm rebasing my branch onto <something>`
17:25 daniel_rose joined #git
17:25 Dougie187 People mix those two things up in their minds, and it relates to commands like: `git checkout master; git rebase <branch>`
17:25 cjohnson would you mind if I PM you for some more questions?
17:25 Dougie187 Thinking that they are still doing the same thing, but it results in the completely wrong history.
17:25 Dougie187 Feel free
17:25 stonercoder joined #git
17:26 Guest55 joined #git
17:27 adac joined #git
17:28 kbs Every once in a while I wonder if github's ui to 'make git simple' is somewhat at odds with what git wants to be :)
17:28 kbs it's simple ... in a different way
17:30 Synthead joined #git
17:32 nedbat kbs: git and github have very different audiences. at least, they are trying to please them in very different ways.
17:33 rubyonrailed joined #git
17:33 keller joined #git
17:34 durham_ joined #git
17:34 BadApe_ joined #git
17:35 kbs right :-) though the intersection set usually is git (the tool) and hence some of the impedance mismatch, I think...
17:36 a3Dman joined #git
17:37 kbs maybe it's more and more github desktop [haven't played with that myself]
17:38 durham joined #git
17:38 a3Dman joined #git
17:40 nitin joined #git
17:40 Rodya_ joined #git
17:42 Spec-Chum joined #git
17:43 keller joined #git
17:45 davisonio joined #git
17:46 DrAwesome joined #git
17:48 mariuscc joined #git
17:50 githogori joined #git
17:52 stamina joined #git
17:53 multi_io joined #git
17:54 Pulp joined #git
17:54 liuzhen joined #git
17:55 rgrinberg joined #git
17:56 keller joined #git
17:56 anonymuse joined #git
18:02 ahmedelgabri joined #git
18:02 ochorocho__ joined #git
18:03 mikecmpbll joined #git
18:06 nitric joined #git
18:06 fuchstronaut joined #git
18:06 morenoh149 joined #git
18:07 romankl joined #git
18:08 romankl joined #git
18:09 slax0r joined #git
18:10 nitric_ joined #git
18:11 slax0r hello, I have the following gitignore setup: http://sprunge.us/IVRM I need to ignore all directories in src/, except for the one "subdir", but since I have !src/subdir in my .gitignore it overrides my **.swp from my core.excludesFile, any way to achieve what I want?
18:12 robotroll joined #git
18:14 mingrammer joined #git
18:16 fahadash joined #git
18:16 kadoban slax0r: I don't know what **.swp means. Is that even valid?
18:16 durham_ joined #git
18:16 ExoUNX joined #git
18:17 durham_ joined #git
18:17 slax0r kadoban: apparently it is, because it ignores *.swp files in all directories
18:17 _ikke_ *.swp would be enough
18:17 kadoban slax0r: Why not just *.swp ? What's the difference?
18:18 slax0r none, probably made a type ages ago, and kept it like that after
18:18 _ikke_ It's not incorrect
18:18 _ikke_ ** matches the same as * in this contect
18:18 _ikke_ context
18:19 slax0r that's true, and corrected
18:19 kadoban Does it? The manpage seems unclear to me, it doesn't seem to match any of the rules it specifies, and thus I assumed it was invalid.
18:19 grawity ** means recursive match in extended shell & git globs
18:20 _ikke_ grawity: also in file context?
18:20 grawity _ikke_: git ls-files "**.c"
18:20 daniel_ joined #git
18:21 Gsham joined #git
18:21 _ikke_ in zsh it doesn't make a difference
18:21 _ikke_ ls *.c or ls **.c
18:21 grawity it's a bit different in bash/zsh
18:21 grawity (also in bash it needs 'shopt -s globstar')
18:21 _ikke_ But for git it does
18:21 antipsychiatry joined #git
18:21 dendazen joined #git
18:21 grawity e.g. **/*.c matches */*.c, */*/*.c, and so on
18:21 antipsychiatry left #git
18:22 grawity git and rsync seem to be more flexible in that regard
18:23 iskander joined #git
18:23 paperziggurat joined #git
18:24 slax0r regardless, I am correct when asuming that when a negated pattern is encountered, it will basically throw all previous patterns out the window right? and I can not make some sort of force on a pattern, stating that all negations should be ignored if this pattern matches?
18:25 NeverDie joined #git
18:25 grawity !gitignore_exception
18:25 gitinfo Problems with creating "exceptions"(eg, !foolib.file) in your .gitignore? Just use `git add -f foolib.file` to override any wildcard matches. Future changes will be noticed, as ignore rules do not apply to tracked files.
18:25 grawity !gitignore_whitedir
18:25 gitinfo A global/directory .gitignore blacklist with a (potentially) subdirectory whitelist is not easy to specify in git. However, something like `echo -e '/*\n!/a/\n/a/*\n!/a/b/\n/a/b/*\n!/a/b/c/' > .gitignore` (ignore everything but a/b/c directory) or `echo -e '*\n!*/\n!*.c' > .gitignore` (ignore everything but *.txt files) may do what you want.
18:25 rominronin joined #git
18:26 ahmedelgabri joined #git
18:27 _ADN_ joined #git
18:27 dmto joined #git
18:28 slax0r of course, subdir contains only *.go files, extended rule to !src/subdir/*.go and off we go. Thanks guys
18:30 jstimm joined #git
18:30 BlaXpirit what is that /\/\/\/\/\
18:31 grawity backslashitis
18:31 BlaXpirit i almost always use gitignore as a whitelist. too bad almost every line has to start with '!'
18:32 _ikke_ Why do you have so many files you need to ignore?
18:32 mrlowskill joined #git
18:33 BlaXpirit cuz cmake :D
18:33 daniel_rose joined #git
18:33 BlaXpirit no but seriously  i like creating some random temporary files like a todo list or a test example
18:33 BlaXpirit much easier to find a pattern that existing files follow
18:34 macefr joined #git
18:34 _ikke_ Why not ignore * and add -f files you want to track?
18:34 BlaXpirit _ikke_, because then it's annoying to add new files
18:36 z1haze_work joined #git
18:36 cagedwisdom joined #git
18:36 cagedwisdom left #git
18:37 z1haze_work hey folks, relatively new to git, I am wondering if there is a way to rollback my local git repository to a certain time.. not necessarily a commit, but there has been local changes to finals, and branches made, things moved, etc.. and i just want to undo all of it and say take me back to where i was this morning
18:38 _ikke_ z1haze_work: There is nothing to do that with one command
18:38 _ikke_ z1haze_work: the reflog keeps track of where every branch was
18:38 _ikke_ z1haze_work: So for each branch, you can reset it to a certain point in time
18:39 z1haze_work even if there werent any git commands run, is there anyway to just get al my local history to rewind to this morning for the whole project
18:39 z1haze_work ok cool, so i know the branch i want to 'rewind' how would i do that
18:40 _ikke_ git show branch@{time} to verify, then git reset --keep branch@{time}
18:41 Rodya_ joined #git
18:41 Remram[m] Git only records history in commits, if you made changes without ever committing Git cannot help you
18:41 axl__ joined #git
18:41 z1haze_work oh, so it must be my ide that tracks local history then?
18:41 * perlpilot wonders if z1haze_work thinks #git is psychic  ;)
18:41 ldlework If you mean "undo"
18:42 z1haze_work i just assumed it was git
18:42 z1haze_work my ide tracks all ocal history of everything
18:42 _ikke_ That's it's own history
18:42 _ikke_ nothing to do with git
18:43 z1haze_work so anyway, this {time} how should it be formatted?
18:43 _ikke_ z1haze_work: Like Remram[m] said, this would only make sense if you made any commits
18:43 _ikke_ git does not track uncomitted changes
18:43 z1haze_work i did a reset
18:43 z1haze_work i want to undo that
18:44 _ikke_ What kind of reset?
18:44 z1haze_work the git kind? i dont know
18:46 _ikke_ What commad did you execute?
18:46 perlpilot z1haze_work: Have you ever heard of the physics concept of "entropy" and the "arrow of entropy" or "arrow of time"?  There are some things, that once done, can not be undone.  _ikke_ is trying to help you figure out if your reset is one of those things.
18:46 z1haze_work git reset origin/develop
18:47 _ikke_ That does not do any file changes
18:47 _ikke_ if you did not specify any --hard
18:47 _ikke_ If that's all you did, then git reset HEAD@{1} would fix it
18:48 nitric joined #git
18:49 hakunin_ joined #git
18:49 abyx joined #git
18:50 hakunin_ is it possible to use git-clean -d -X to reset stuff in a single directory of my project?
18:50 raijin joined #git
18:50 hakunin just have some build artifacts, would be convenient to use that
18:50 Sasazuka I'm messing around with git pull --log=blah, obviously my repo doesn't have that much to pull, I guess I'd have to git reset --hard commit to test it or is there a better way?
18:50 Seveas hakunin: have you tried git clean -d -X path/goes/here/
18:50 Seveas manpage makes it looks like that should work
18:51 hakunin Seveas: haven't, i just read the manpage and didn't even notice, thank you
18:51 hakunin Seveas: that totally works
18:51 hakunin Seveas: was just focused on the flags instead
18:52 zerox2a joined #git
18:58 roelmonnens joined #git
19:00 MattMaker joined #git
19:02 gundas joined #git
19:02 gundas Hi all
19:02 gitinfo gundas: 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:02 jstimm joined #git
19:03 gundas Is there a way to setup a git hook to push to a remote repo. after a push has occurred to another remote repo?
19:03 roelmonnens joined #git
19:03 ronskisika joined #git
19:03 _ikke_ where are these repos hosted?
19:04 flaguy48 joined #git
19:04 flaguy48 left #git
19:04 zacts joined #git
19:05 corpix joined #git
19:06 Stace` joined #git
19:07 sebboh joined #git
19:08 rahtgaz joined #git
19:08 roelmonnens joined #git
19:08 gundas @_ikke_: One is hosted on an internal network (the one I will push to) and the other is off the network but available publically
19:11 ertes joined #git
19:11 ronskisika joined #git
19:12 _ikke_ Are you able to set up hooks on that off-network repository?
19:12 roelmonnens joined #git
19:14 indistylo joined #git
19:15 Ravana joined #git
19:19 axl_ joined #git
19:21 peepsalot joined #git
19:22 gundas @_ikke_: yes
19:24 _ikke_ And you can also push from remote to your network?
19:25 xaa joined #git
19:26 gundas @_ikke_: No
19:27 Munt joined #git
19:27 rominronin joined #git
19:27 _ikke_ How would expect to push to that internal repo than?
19:27 stamina joined #git
19:29 spudowiar joined #git
19:31 zacts joined #git
19:32 dendazen joined #git
19:33 ronskisika joined #git
19:34 kuldeep joined #git
19:34 ochorocho__ joined #git
19:34 Finnoloid joined #git
19:34 fuchstronaut joined #git
19:35 gundas @_ikke: Cause I'm on the internal network. I can push to it anytime. The idea is I push to the internal network remote git repo and then at the same time push to the external remote git repo. I can do it now but I have to do 2 pushes. I was wondering if I can automate the second push?
19:36 _ikke_ You can put a hook on the internal one
19:36 _ikke_ to push to the remote one
19:36 raijin joined #git
19:36 phanimahesh or create a remote helper script and change the remotes
19:37 OnOut2k16 joined #git
19:37 gundas @_ikke: Ah cool
19:37 XDS2010 joined #git
19:38 peepsalot joined #git
19:38 atomicb0mb joined #git
19:39 rgrinberg joined #git
19:42 ochorocho__ joined #git
19:42 Rodya_ joined #git
19:42 vassagus joined #git
19:42 LionsMane joined #git
19:43 johnmilton joined #git
19:44 kulelu88 joined #git
19:46 mariuscc joined #git
19:48 z1haze_work I am trying to push my new local brand to my github repository and im getting a fatal error saying repository 'https://... my repo/' not found
19:48 Hink joined #git
19:49 z1haze_work it seems to be adding a / on the end on its own
19:49 hahuang61 joined #git
19:49 z1haze_work git remote -v shows the correct origin without the trailing slash
19:49 axl_ joined #git
19:49 osse z1haze_work: what exact command are you running?
19:50 z1haze_work git push -u origin feature/PUMADEV-XXX
19:50 GhettoJava joined #git
19:50 MattMaker joined #git
19:50 osse and the URL is correct?
19:50 zacts_ joined #git
19:50 z1haze_work my current branch is feature/PUMADEV-XXX
19:51 nivag joined #git
19:51 osse i just intentionally added a trailing slash on a remote and it worked fine
19:52 ToBeCloud joined #git
19:53 z1haze_work so i have to do anything to set the upstream
19:54 zacts__ joined #git
19:54 sebboh joined #git
19:54 z1haze_work yea i dont understand why it is saying respository not found
19:54 Hink joined #git
19:54 ochorocho__ joined #git
19:54 osse and the URL is correct?
19:55 z1haze_work yes
19:55 osse !repro
19:55 gitinfo [!transcript] Please paste (using https://gist.github.com/ or https://vomitb.in/ ) a transcript ( https://gist.github.com/2415442 ) of your terminal session so we can see exactly what you see
19:55 zacts joined #git
19:56 fuchstronaut joined #git
19:56 z1haze_work https://github.com/TradeGlobal/pum-demandware-pna this is the repo but its private
19:57 brandonw joined #git
19:57 _ikke_ osse: No one is replying to your patch :-(
19:57 osse ;_;
19:58 m0viefreak joined #git
20:00 osse ok, be that way
20:00 z1haze_work joined #git
20:01 vassagus joined #git
20:01 raijin joined #git
20:02 kfunk joined #git
20:02 anonymuse joined #git
20:05 t0by joined #git
20:06 crayon joined #git
20:06 crayon joined #git
20:07 lacrymology joined #git
20:08 Gsham joined #git
20:09 MattMaker joined #git
20:09 cfxd joined #git
20:13 spudowiar joined #git
20:13 osse z1haze_work: can you show a transcript of you running git fetch, git remote -v and your push?
20:15 cdg joined #git
20:16 fakenerd joined #git
20:17 zacts joined #git
20:19 lacrymology joined #git
20:20 d5sx43 joined #git
20:21 ochorocho__ joined #git
20:22 a3Dman joined #git
20:23 d5sx43 joined #git
20:24 BrianJ joined #git
20:24 efco joined #git
20:24 davisonio joined #git
20:24 mariuscc joined #git
20:29 a3Dman joined #git
20:29 rominronin joined #git
20:31 raijin joined #git
20:33 daniel_rose joined #git
20:33 diogenese joined #git
20:34 xelxebar joined #git
20:36 roelmonnens joined #git
20:36 zarel joined #git
20:36 LeBlaaanc joined #git
20:36 abyx joined #git
20:38 morenoh149 how do I apply a commit from one branch onto another?
20:38 _ikke_ morenoh149: man git cherry-pick
20:38 gitinfo morenoh149: the git-cherry-pick manpage is available at http://jk.gs/git-cherry-pick.html
20:39 osse _ikke_: you can respond to it! "this looks like a handy feature and I have in fact been missing it when I resort to parsing git branch"
20:39 NeverDie joined #git
20:39 _ikke_ osse: I would if I actually was looking for it :P
20:40 chrisshattuck joined #git
20:40 osse _ikke_: it's just a white lie
20:40 sebboh joined #git
20:41 osse ok, then "this looks like a handy feature and I would in fact be missing it If I had resorted to parsing git branch"
20:41 cyan__ joined #git
20:41 a3Dman joined #git
20:41 _ikke_ "Osse is a nice guy, please look at his patch" :P
20:41 xnrand joined #git
20:42 osse that just sounds desperate
20:42 osse but I am :(
20:42 Rodya_ joined #git
20:43 jstein__ joined #git
20:44 a3Dman joined #git
20:45 armin_ joined #git
20:48 vassagus joined #git
20:48 a3Dman joined #git
20:48 vassagus joined #git
20:50 _ikke_ osse: I've successfully applied the patch locally :P
20:50 osse omg
20:51 jimi_ joined #git
20:52 _ikke_ osse: test failed
20:52 raijin joined #git
20:53 _ikke_ ah, building makes sense :P
20:53 vassagus joined #git
20:53 Gsham joined #git
20:54 xelxebar joined #git
20:54 a3Dman joined #git
20:54 laidback_01 joined #git
20:56 fuchstronaut joined #git
20:59 Rodya_ joined #git
21:00 Spec-Chum joined #git
21:00 Rodya__ joined #git
21:00 atomicb0mb joined #git
21:03 davisonio joined #git
21:05 Rodya_ joined #git
21:07 jeffreylevesque joined #git
21:08 d5sx43 joined #git
21:08 GhettoJava joined #git
21:09 Literphor joined #git
21:09 fuchstronaut joined #git
21:10 jimi_sanchez joined #git
21:10 dsantiago joined #git
21:11 vassagus joined #git
21:13 LeBlaaanc joined #git
21:14 i5chQ1u joined #git
21:14 dsdeiz joined #git
21:14 vassagus joined #git
21:15 i5chQ1u left #git
21:16 satifant joined #git
21:17 lacrymology joined #git
21:17 lacrymology I have a conflict pre-solved by rerere and I'd like to resolve it. I'm in the middle of the rebase right now.. is it p
21:17 lacrymology ossible, or do I have to abort+forget+re-rebase?
21:20 vassagus joined #git
21:20 fakenerd joined #git
21:20 vassagus joined #git
21:21 UTAN_dev_ joined #git
21:22 a3Dman joined #git
21:28 sebboh joined #git
21:30 nitric_ joined #git
21:30 rominronin joined #git
21:31 Gsham joined #git
21:32 benbergman joined #git
21:37 Corosauce joined #git
21:39 Dougie187 left #git
21:41 thiago joined #git
21:41 anuxivm joined #git
21:46 vuoto joined #git
21:51 sgen joined #git
21:55 MattMake_ joined #git
21:57 durham joined #git
21:58 alansaul joined #git
21:59 tlaxkit joined #git
22:00 hwrdprkns joined #git
22:04 zacts joined #git
22:05 fuchstronaut joined #git
22:06 kyan joined #git
22:07 blackwind_123 joined #git
22:08 Xizor joined #git
22:08 wilhelmtell joined #git
22:09 wilhelmtell left #git
22:09 wilhelmtell joined #git
22:10 z1haze_work how could i just remove the trace of a folder from my git repo but still keep it in my project etc
22:11 _ikke_ git rm --cached trace
22:11 z1haze_work trace being the folder?
22:11 wilhelmtell what do you mean "remove from git but keep in project"? if it's not in git it's not in your project, no?
22:12 ahr3n joined #git
22:12 z1haze_work well im not exactly sure how this issue came to be. but i have a local git repo that was initialized when i clone our main repo
22:12 z1haze_work which pulled in the entire project, etc
22:13 wilhelmtell ? "etc" ?
22:13 z1haze_work then i pulled in another folder from the repo ( i guess i didnt pull that one in initially for some reason) and now its tracking this new folder as unversioned files
22:13 z1haze_work but it shouldnt
22:13 osse i did something cool today I didn't know worked:  @{u}@{1}
22:13 osse useful:  git rebase --onto=@{u} @{u}@{1}
22:14 cbreak z1haze_work: git doesn't support pulling of directories
22:14 cbreak z1haze_work: you did something other than you claim
22:14 z1haze_work i guess so
22:14 fuchstronaut joined #git
22:14 z1haze_work but the fact of the matter is i want these newly added folders to my project to pretend like that were there from the start
22:14 cbreak but if it's unversioned, just remove it as said above
22:15 z1haze_work then it deletes the actual files
22:15 cbreak if you want to commit them, just commit them
22:15 cbreak z1haze_work: nope
22:15 z1haze_work it does in intellij
22:15 hahuang61 joined #git
22:15 z1haze_work i guess it just assumes i want them gone
22:16 wilhelmtell z1haze_work: i have no idea what you want, or what state you're in. i'm going to make a guess. first, if you have a bunch of files you don't know how they got in the repository, you can look in the log. $ git log folder/file.txt
22:17 wilhelmtell this will list commits that change folder/file.txt. the first of these commits, in the bottom of the log, is the commit that introduced the file.
22:18 AnarchyAo joined #git
22:18 wilhelmtell this will explain things to you. next, if you want to remove the file, $ git rm folder/file.txt && git commit
22:18 anonymuse joined #git
22:18 wilhelmtell this will delete the file and stop tracking it.
22:18 wilhelmtell is that what you want?
22:19 z1haze_work no i wanted to keep them in their location just remove tracking of any current changes
22:19 z1haze_work and start from this time forward
22:19 MattMaker joined #git
22:19 wilhelmtell z1haze_work: if you want to keep the file in the filesystem, but stop tracking it, then: $ git rm --cached folder/file.txt
22:19 wilhelmtell && git commit
22:20 z1haze_work can you do entire folder or no?
22:20 wilhelmtell yes.
22:20 wilhelmtell $ git rm --cached -r folder
22:20 z1haze_work alright, and just because i remove it now, it will still track future changes to it, correct?
22:20 wilhelmtell no. you just asked me not to remove it, to keep it, but to stop tracking it.
22:21 wilhelmtell stop, think, clarify yourself what you want, then ask. you're confusing me. ><
22:21 z1haze_work right now git is telling me i have 214 unversioned files
22:21 z1haze_work i dont want that
22:21 z1haze_work i need the files
22:21 z1haze_work but i dont need to commit anything because nothing is actually changed from the repo
22:21 AnarchyAo joined #git
22:21 sebboh joined #git
22:21 wilhelmtell "i need the files". but they are there. what do you mean you need them? you need them tracked?
22:22 z1haze_work these files are identical to the remote repository files
22:22 raijin joined #git
22:22 fakenerd joined #git
22:22 z1haze_work haha, dang i didnt think this would be hard to explain
22:23 wilhelmtell "i dont want that". you don't want what? git telling you you have 214 untracked files? having these files there? not having them tracked?
22:27 abyx sounds like he just wants to gitignore those files ¯\_(ツ)_/¯
22:30 wilhelmtell but, earlier he said they were tracked. it makes little sense to ignore tracked files. and then he said they aren't tracked. i have no idea.
22:30 altendky joined #git
22:30 z1haze_work i guess i just dont know why my local repo is saying i have 214 untracked files
22:30 z1haze_work they are all files that were part of the initial clone
22:30 madewokherd joined #git
22:30 atomicb0mb joined #git
22:30 wilhelmtell ok. what files are they?
22:31 wilhelmtell can you name a few?
22:31 z1haze_work they are just project files
22:31 wilhelmtell i don't know what that means.
22:31 z1haze_work its not going to make a difference, they are normal website files that are on the site
22:31 z1haze_work they are just files
22:31 z1haze_work but for some reason my local repo is acting like they are new
22:31 rominronin joined #git
22:32 wilhelmtell just files? would it hurt to delete them?
22:32 z1haze_work uh yea
22:32 wilhelmtell so they're not "just files". whatever that means.
22:32 wilhelmtell they're important.
22:32 z1haze_work project files (files related to this project)
22:32 sondr3 joined #git
22:32 z1haze_work files that are in the respository that i cloned
22:32 wilhelmtell and you want to track them.
22:32 wilhelmtell correct?
22:32 z1haze_work i DO
22:32 wilhelmtell thank you.
22:32 z1haze_work but why are they not already being tracked
22:33 wilhelmtell i don't know. first, before you do something silly:
22:33 z1haze_work too late for that
22:33 wilhelmtell $ git add folder/those_files
22:33 wilhelmtell $ git commit
22:33 wilhelmtell do this first.
22:34 wilhelmtell of course, substitute "folder/those_files" with those files
22:34 z1haze_work spent two days working on updates to this and then someone came to 'help' push it up to the correct repo, etc. and ended up screwing up everything now ive been spending the last 5 hours just trying to get back to where i was before he 'helped' me
22:34 z1haze_work and when i do git add /those/files it adds them all to be committed
22:35 wilhelmtell yes.
22:35 wilhelmtell is that not good?
22:35 z1haze_work i havent changed them since i cloned the repo.. i dont need to commit them
22:35 wilhelmtell ok stop.
22:35 wilhelmtell you said git says they're not tracked. and, that you want them tracked. i conclude from that, that you do want to commit them.
22:35 z1haze_work out of the 10,000 files that were initially cloned from this repo, only 214 are saying they are unversioned
22:36 z1haze_work im just guessing its something this guy did along the way or maybe something i did trying to undo what he did that is causing this
22:36 z1haze_work its looking like i mgoign to have to just wipe it clean, reclone the repository and start all my work over again
22:37 wilhelmtell z1haze_work: look, right now, i suggest you commit them. if you want to be safe, commit them. so. three commands:
22:37 wilhelmtell $ git checkout -b fix_situation master
22:37 z1haze_work i am only allowed to commit the files that ive worked on
22:37 wilhelmtell $ git add folder
22:37 wilhelmtell $ git commit
22:37 z1haze_work the person who does code reviews will have a fit
22:38 z1haze_work im sorry to waste your time this evening
22:38 z1haze_work i am going to just start over
22:39 wilhelmtell you sound like you're about to lose it.
22:39 wilhelmtell *it
22:39 wilhelmtell your mind
22:39 z1haze_work yea basically
22:39 z1haze_work supposed to hit production tomorrow and its 2 days of work
22:40 z1haze_work just got thrown into this project a week ago, never used git - my department always used tfs so much different to leave
22:40 z1haze_work learn
22:40 ShapeShifter499 joined #git
22:41 wilhelmtell i still have next to no idea what's your issue and a fixed situation would look like for you.
22:41 wilhelmtell but
22:41 wilhelmtell for what i understand, you have a set of files that are not tracked, and would be a disaster to lose.
22:41 z1haze_work they were just not being tracked locally
22:41 z1haze_work they are already in the remote repository
22:41 wilhelmtell so for this reason, i say to you, before you do anything, commit these files.
22:42 wilhelmtell aha
22:42 vassagus_ joined #git
22:42 wilhelmtell wow, it's like info is bring dripped
22:42 wilhelmtell *being
22:42 z1haze_work my issue (one of the many issues) is that my local repo was showing them as unversioned when it shouldnt
22:43 wilhelmtell they might be a build residue
22:43 z1haze_work to step through how it all started was - last week i cloned our develop branch, from the remote repo and started working on it locally in my pc - well i found out today and i was supposed to clone the develop branch, and then create a new local branch and commit my changes to that branch instead
22:44 wilhelmtell look, if they're not yours, you have no idea where they came from, just ignore them. get what you need done done, and get back to it when you're calmer.
22:44 z1haze_work so at this point, i have like 40 files in the develop branch that ive modified, that should have be modified in a new branch instead
22:44 z1haze_work so he instructed me to created a new branch, then add all those changes to that branch instead, then reset the develop branch
22:44 Es0teric joined #git
22:45 wilhelmtell okay.
22:45 wilhelmtell i see.
22:45 wilhelmtell have you pushed your changes in the develop branch?
22:45 z1haze_work so somewhere along the way, everything got screwed up
22:45 z1haze_work no, and im not supposed to
22:45 wilhelmtell good.
22:46 wilhelmtell do you have any work that you haven't committed yet?
22:46 z1haze_work i havnet comitted anything
22:46 wilhelmtell you just said you have committed 40 commits in the develop branch.
22:46 wilhelmtell what do you mean you haven't committed anything?
22:46 z1haze_work i apologize if i said that, i have 40 files that ive either added/edited etc
22:46 wilhelmtell *40 files
22:47 wilhelmtell ok.
22:47 z1haze_work so what im trying to work toward now is this:
22:47 z1haze_work use my IDE to roll back my entire project to the last known good time
22:47 wilhelmtell so, you have 40 files that are modified, but that are tracked already in the develop branch, and that you haven't committed your modifications yet.
22:47 z1haze_work in turn that should update the local git repo too, right
22:47 z1haze_work yes
22:47 wilhelmtell hold on.
22:47 wilhelmtell slow down.
22:47 SpecChum joined #git
22:47 wilhelmtell don't do anything.
22:48 wilhelmtell you have 40 files you have changed.
22:48 wilhelmtell correct?
22:48 z1haze_work yea, 40ish
22:48 wilhelmtell and you don't want to lose this work, correct?
22:48 z1haze_work correct
22:48 z1haze_work i mean i wont lose it
22:48 hwrdprkns joined #git
22:48 wilhelmtell and you want this work committed, correct?
22:48 z1haze_work like i said i have local history of everything
22:48 z1haze_work yes but i have to make sure its on a different branch
22:48 wilhelmtell hold on.
22:48 wilhelmtell wait
22:48 z1haze_work i know what i have to do, just how to do it is  abit confusing
22:48 z1haze_work ok
22:48 wilhelmtell you're confsing me
22:49 z1haze_work the develop branch, is just to pull the codebase to
22:49 wilhelmtell earlier you said you have committed nothing. now you just said you won't lose it, because it's in the history.
22:49 z1haze_work when i work on a ticket, i make a local branch, with the ticket number, ok
22:49 z1haze_work any changes i make git added to that new branch
22:49 z1haze_work but i didnt know this, so i was doing on my work on the develop brnach
22:50 wilhelmtell ok, to avoid repetition: i understand you have been working on the develop branch, when you should have been on a new dedicated branch instead.
22:50 z1haze_work its juts a matter of getting my workspace back to a good known location, creating a local branch, moving add those changes files to THAT branch, then reset the develop one
22:50 wilhelmtell i underesatnd that.
22:50 crayon joined #git
22:50 z1haze_work yep
22:51 wilhelmtell what i want to understand is this: on the develop branch, do you or do you not have commits of your own that should not be there.
22:51 z1haze_work can you instruct me on how i can reset my local git repo to the previous commit?
22:51 z1haze_work or at least see which commit im on
22:51 z1haze_work i have no commits on develop
22:51 z1haze_work no commits anywhere
22:51 wilhelmtell of course i can. i'm just trying to slow down because it souns to me like you're in histeria, and you're about to lose work here if you don't slow down.
22:51 zivester joined #git
22:51 durham joined #git
22:52 wilhelmtell you seem confident you won't lose work. i'm not confident about that.
22:52 vassagus joined #git
22:52 z1haze_work well, intellij keeps history of files on its own
22:52 z1haze_work so even if i reset the git repo
22:52 z1haze_work it still tracks all my changes to files which i can move to at any point
22:52 Vaelatern joined #git
22:53 wilhelmtell i don't know intellij, so i don't trust it. if you trust it, and something goes wrong, you'll need someone else to help you. i can only help with git.
22:53 z1haze_work well i want to empty my git repo locally
22:53 wilhelmtell here is what i suggest.
22:53 wilhelmtell first, know where you're standing.
22:53 wilhelmtell $ git branch
22:53 z1haze_work doing git reset --hard origin/develop did not remove the message of having 200 unversioned files, i thought it should
22:54 wilhelmtell this will tell you what branch you're on.
22:54 z1haze_work ok
22:54 z1haze_work current on develop
22:54 wilhelmtell ok.
22:54 wilhelmtell next, $ git status
22:54 z1haze_work and the code base is rolled back to the beginning of whatever commit this is
22:54 wilhelmtell will tell you what files are modified, what are untracked, and what are missing.
22:54 z1haze_work i have no changes currently
22:54 z1haze_work yea i know
22:54 z1haze_work basically im looking at a fresh pull
22:55 z1haze_work which is why i want to reset the local repo so it doesnt think i have unversioned files
22:55 wilhelmtell ok. so you're on develop, and you have no changes. not even 214 untracke files. pristine checkout.
22:55 ResidentBiscuit joined #git
22:55 wilhelmtell if you do git reset --hard it will not touch files git doesn't track.
22:55 z1haze_work there are still 214 untracked files
22:55 z1haze_work ah
22:55 MattMaker joined #git
22:55 z1haze_work if i add them ,and then reset will it remove that message
22:55 ochorocho__ joined #git
22:55 z1haze_work i basically just want a blank slate as far as the git repo goes
22:56 wilhelmtell if you want to *delete* files git does't track, if you want to have a *pristine* checkout, the same as if you just cloned the repo, then $ git clean -fdx
22:56 wilhelmtell this is *destructive*
22:56 wilhelmtell a *destructive* commands that can delete things you won't be able to recover.
22:56 afuentes joined #git
22:57 z1haze_work so now i have 5754 unversioned files
22:57 z1haze_work wilhelmtell: i basically need to get to the point where this local repo is only trackign the changes to the 40 files
22:58 wilhelmtell specifically, git-clean does nothing for this reason, and demands you pass -f or --force to do its thing. -d will remove untracked directories, and -x will remove ignored files.
22:58 anonymuse joined #git
22:58 z1haze_work do i need to just delete the .git folder
22:58 z1haze_work set my code how i want it
22:59 z1haze_work then init a new repo
22:59 wilhelmtell you can throw the repo away and re-clone it, sure. at this point, i'm so confused where you're at
22:59 _nwkj86 joined #git
22:59 z1haze_work the end result is simple - if i change 40 files, i only commit/push 40 files
23:00 z1haze_work i want my repository to mirror the changes to my code
23:00 wilhelmtell i wish i could help you see how git works, because then you'd be like a fish in the water, and you'd have zero doubt and fear.
23:00 wilhelmtell ok.
23:00 wilhelmtell create a new branch.
23:00 wilhelmtell $ git checkout -b new_branch_name develop
23:01 z1haze_work let me fix the codebase now since that git commit deleted those directories
23:01 wilhelmtell this creates a new branch named new_branch_name that is based on the develop branch
23:01 wilhelmtell then, git add the files, and git commit them
23:01 GhettoJava joined #git
23:02 durham joined #git
23:02 alansaul joined #git
23:04 Rodya_ joined #git
23:06 rkazak joined #git
23:07 bronson joined #git
23:09 alansaul joined #git
23:09 z1haze_work so what does rebase do, it sounds like thats what i want
23:09 jast !rebase
23:09 gitinfo 'git rebase' takes away your local commits, updates your branch with new stuff from <upstream> (argument), then re-applies your local commits on top. This makes it look like your commits were created "after" the new stuff, and it can look cleaner than doing a !merge. Beware of !rewriting_public_history, though. Not to be confused with !interactive_rebase.
23:10 wilhelmtell z1haze_work: do you know what a turing machine is?
23:10 z1haze_work nope
23:10 wilhelmtell z1haze_work: are you a programmer?
23:11 jast let me guess... git gets easier once you get that branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space
23:11 jast ;)
23:11 z1haze_work yes
23:12 sebboh joined #git
23:12 mjuszczak joined #git
23:12 wilhelmtell jast: i'm not trying to be a dick. i'm trying to communicate the basics. things, like reset and rebase and branch flow from that. do you agree?
23:12 jast if you know your way around basic tree and graph data structures, this might help with understanding git's structure: !gcs
23:12 gitinfo [!concepts] "Git Concepts Simplified" explains the basic structures used by git, which is very helpful for understanding its concepts. http://gitolite.com/gcs.html
23:12 mjuszczak joined #git
23:13 jast wilhelmtell: I'm just joking around :)
23:13 wilhelmtell z1haze_work: okay. bear with me here.
23:14 z1haze_work not all programmers use git
23:14 wilhelmtell z1haze_work: i'm not sure how old you are, so at the risk of sounding like a moron: do you know what a pins printer, or an inkjet, are?
23:15 mingrammer joined #git
23:15 z1haze_work i hadnt hardly used it until now
23:15 z1haze_work what are you getting at
23:15 z1haze_work i dont need a philosphy
23:15 z1haze_work i appreciate the help you are giving
23:15 wilhelmtell i'm getting at how git works. there are basics that once you know them, you don't need this chatroom's help for nearly anything anymore.
23:15 z1haze_work i understand how git works
23:16 z1haze_work i've been using team foundation server for years
23:16 wilhelmtell ><
23:16 jast so team foundation server is based on a directed acyclic graph model, too?
23:16 z1haze_work version control, i get it
23:16 wilhelmtell z1haze_work: i'm trying to say, politely, no, you don't.
23:16 z1haze_work it might be? i dont follow it that closely
23:17 jast the thing is, git's approach to version control is a bit different from traditional systems like SVN (can't speak to TFS because I've never used it)
23:17 jast it doesn't change many of the standard operations you use but some of the advanced stuff is much easier to grok if you're aware of how git ties everything together
23:17 wilhelmtell people often lose their mind with git because they try so hard to apply what they know about {svn,cvs,tfs,perforce,insert-vcs-here} on git
23:18 rawtaz joined #git
23:18 jast so, if you want to get into more advanced usage, it's by no means required but very helpful to look a bit more into how git "thinks about" version control
23:19 jast and that's all I'm going to say for now. it's past 1am and I have work later today. :} see ya!
23:19 z1haze_work well all of my actual experience with git has been just where ive been the only one working ona project, etc
23:19 wilhelmtell z1haze_work: to repeat: i'm trying to communicate to you the secret that will turn you from someone losing his/her mind over a stupid tool he never used before nor cares about nor wants in his/her life, to something out of your way.
23:19 z1haze_work i never had to worry about merges, and new branches for changes, and pull requests and all that
23:20 z1haze_work is there a git command that resets the git repo and leaves files alone
23:20 jast !reset :)
23:20 gitinfo reset does two things! (1) without file/path argument: 'git reset [flags] [<commit>]' = make the current branch point to <commit> (default: HEAD). --soft = don't do anything else. --mixed (default) = overwrite the index to match. --hard = overwrite the working files to match. (2) 'git reset [<commit>] -- <path>' = overwrite the index entries for <path> with the content from <commit> (default: HEAD)
23:20 z1haze_work that doesnt do that - at least not for me
23:20 jast that wasn't actually quite what I means. the question is, what do you mean by 'reset'
23:21 z1haze_work something short of deleteing the .git folder and reinit
23:21 jast so you want to get rid of all your history?
23:21 wilhelmtell z1haze_work: you're using terminology here that i frankly don't undertand, or that i think i do but am fairly sure is not what you mean.
23:21 z1haze_work yea i want it to stop telling me i have unversioned files, they should already be versioned
23:21 wilhelmtell jast: >< of course not!
23:21 jast hmm, but resetting everything will make things less versioned, not more versioned, will it? ;)
23:22 jast so 'git status' lists these files as 'untracked'?
23:22 z1haze_work well like this: when you clone a repo
23:22 z1haze_work it doesnt tell you you have 5000 unversioned files does it
23:22 z1haze_work it automatically starts trackign them when you clone the repo right?
23:22 z1haze_work so when you commit, you dont have to commit 5000 files, only the ones you touch
23:22 fakenerd joined #git
23:23 jast sure. let me just ask a bunch of questions so I understand your situation and then I'll explain _everything_ ;)
23:23 Gsham joined #git
23:24 jast 1) 'git status' says they're 'untracked'? 2) this wasn't the case earlier (i.e. 'git log -- one/of/those/files' outputs something)?
23:24 dreiss joined #git
23:25 wilhelmtell ok, this is my last attempt. z1haze_work
23:26 wilhelmtell if you imagine for a moment an inkjet printer, you know there's the head of the printer going back and forth when it's printing.
23:26 ffabi joined #git
23:26 wilhelmtell this, in a nutshell, is the HEAD of a git repository.
23:26 wilhelmtell it's like a printer's head, going back and forth, writing.
23:27 jast I really don't follow that analogy
23:27 wilhelmtell writing what? writing commits.
23:27 wilhelmtell jast: short of a turing machine.
23:27 jast HEAD is a symref
23:27 jast it tells git which branch to advance when committing
23:28 jast there's no equivalent to that in typewriters, nor any other mechanical device I can think of right now
23:28 jast a tape loader, perhaps? :)
23:28 wilhelmtell z1haze_work: in git, when you commit, the head advnances rightwards, then writes the commit
23:28 wilhelmtell jast: yes, details, never mind that.
23:29 wilhelmtell z1haze_work: the point is, you have a head that writes and advances linearly. write, advance. write, advance.
23:29 jast the fact remains that HEAD doesn't "write commits"
23:29 wilhelmtell jast: it does, for this purpose. i know, it's a special ref, a ref to a ref, i know. but it doesn't matter now.
23:29 jast and I can't afford to wait around any longer for z1haze_work to answer my questions so I'm going to go get some sleep now. best of luck, everyone.
23:30 wilhelmtell oh ffs i'm trying to clarify things and you mistify them again.
23:30 wilhelmtell fuck it.
23:30 abyx joined #git
23:30 wilhelmtell good luck.
23:30 wilhelmtell left #git
23:31 Hello71 for the record it also doesn't "advance linearly"
23:31 Hello71 also, lol "mistify"
23:31 Hello71 jast: clean that up, you're getting water everywhere
23:31 jast (PS. maybe I'm completely wrong about this, but my intuition says there's a much less misleading but still easy-to-understand analogy)
23:32 Hello71 from a user perspective, HEAD is just another ref
23:32 jast (or one could simply read GCS)
23:32 z1haze_work thanks for the help
23:32 z1haze_work this is beyond a GIT issue at this point
23:32 rominronin joined #git
23:33 jast what, is your hard drive making strange noises? :/
23:33 GhettoJava joined #git
23:33 ffabi joined #git
23:33 pothepanda joined #git
23:33 z1haze_work you keep saying you are leaving :)
23:33 jast I'm not very sensible
23:34 z1haze_work go get some rest
23:34 Es0teric joined #git
23:34 jast oh, all right... if it makes you happy... :}
23:34 jast good night!
23:35 user083 joined #git
23:37 dsdeiz joined #git
23:39 rubyonrailed joined #git
23:39 brandonw joined #git
23:41 nidr0x joined #git
23:41 raijin joined #git
23:41 CheckDavid joined #git
23:43 ljc joined #git
23:48 m0j0 joined #git
23:55 cqi joined #git
23:59 ivan_on_trac joined #git

| Channels | #git index | Today | | Search | Google Search | Plain-Text | summary