Advertisement
Guest User

Fun on #git

a guest
Sep 3rd, 2017
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.74 KB | None | 0 0
  1. * sammyg has quit (Remote host closed the connection)
  2. * sammyg (~sammyg@unaffiliated/sammyg) has joined
  3. * overlord_tm (~andraz@89-212-104-188.dynamic.t-2.net) has joined
  4. <Contessa> yes buggaboosanchez
  5. <Contessa> I recommend using rebase -i
  6. * Murr has quit (Remote host closed the connection)
  7. * ahrs has quit (Remote host closed the connection)
  8. <Contessa> so that you can specify exactly which commits will end up in your moved branch
  9. * Murr (~Murr@212-51-143-40.fiber7.init7.net) has joined
  10. <buggaboosanchez> I found this: https://stackoverflow.com/questions/5471174/move-branch-pointer-to-different-commit-without-checkout but I don't know if it's the same question being asked
  11. * ahrs (~quassel@gateway/vpn/privateinternetaccess/ahrs) has joined
  12. <buggaboosanchez> And I have no familiarity with using the rebase command in git (sooo newb)
  13. * sammyg has quit (Client Quit)
  14. <buggaboosanchez> I would use that ^ linked article as a guide but not sure if it's the same
  15. * test123456 has quit (Quit: Leaving)
  16. <Contessa> Since you want to rebase Branch B off of Branch A, make sure you are in Branch B
  17. <Contessa> then type:
  18. <Contessa> git rebase -i BranchA
  19. <Contessa> You will get a screen listing each commit that will be based off of Branch A's HEAD, with the earliest at the top and the latest at the bottom
  20. <buggaboosanchez> Contessa: thx
  21. <Contessa> np :-)
  22. <Contessa> If you want to remove commits, comment them out. There should be a list of instructions at the bottom of the screen when in interactive mode.
  23. * tribly has quit (Quit: WeeChat 1.9)
  24. * aax has quit (Ping timeout: 248 seconds)
  25. <buggaboosanchez> -i (interactive mode). cool
  26. <buggaboosanchez> Contessa: What happens if I don't include the -i flag? Does it just automatically run through the whole thing and do it?
  27. <Contessa> it's the equivalent of using -i and not changing anything
  28. * Phanes has quit (Quit: This is not a ragequit.)
  29. <Contessa> so yes
  30. <buggaboosanchez> I know I want the whole thing - thx
  31. <Contessa> but rebase -i allows you to see what you will do before doing it, and lets you do a whole lot more (renaming commits, reordering, skipping commits, squashing commits, editing commits, etc.)
  32. <Contessa> if anything goes wrong, you can always use 'git reflog' to see your history and reset to an earlier state.
  33. * chachasmooth has quit (Ping timeout: 240 seconds)
  34. <buggaboosanchez> Am I supposed to get an output: "Current branch Branch_B is up to date." ?
  35. <buggaboosanchez> I mean, is that right, or does it indicate an error?
  36. <Contessa> what command did you run?
  37. * overlord_tm has quit (Ping timeout: 260 seconds)
  38. <dminuoso> Is there a way to rebase interactive with two branches at the same time?
  39. <Contessa> what do you mean dminuoso ? Rebase two branches onto a common parent?
  40. * chachasmooth (~chachasmo@unaffiliated/chachasmooth) has joined
  41. <buggaboosanchez> I did git checkout Branch_B (so I was on the branch I wanted to move from master to a different branch. Then I did git rebase Branch_A (the branch I want Branch_B to ultimately be attached to / branched off of). I got that output after that.
  42. <dminuoso> Contessa, I want to play lego with two branches basically. cherry pick a sequence of commits from one branch, squash and move to the head of another.
  43. <dminuoso> basically the rebase interactive editor with 2 branches at the same time.
  44. <Contessa> buggaboosanchez, check to see if your commit log is correct using 'git log --decorate --graph --oneline'
  45. <Contessa> dminuoso, would you be in one of the branches at the time?
  46. <Contessa> if so, then you can do that with git rebase -i
  47. <dminuoso> Contessa, how do I get access to the other branch?
  48. <Contessa> dminuoso, let's say you're in branch A. You want to squash its commits into one commit and move that onto branch B?
  49. * dsantiago (~dsantiago@cpe-104-175-193-69.socal.res.rr.com) has joined
  50. <Contessa> if so, check out branch A and type 'git rebase -i branchB'
  51. * fstd_ (~fstd@unaffiliated/fisted) has joined
  52. * fstd has quit (Read error: No route to host)
  53. * fstd_ is now known as fstd
  54. <Contessa> in there, leave the top commit untouched. Change subsequent commits from 'pick' to 'squash'
  55. <buggaboosanchez> Contessa: Looks accurate to the best of my recollection. But I may have screwed something up deleting a branch earlier or something. It isn't an important repo - just fiddling / learning
  56. <Contessa> alright :-)
  57. <minibar> cis there a global option which can enable --committer-date-is-author-date for every rebase?
  58. <Contessa> btw, git rebase -i is one of my favourite commands. It's my git swiss army knife
  59. * Phanes (Phanes@2600:3c02::f03c:91ff:fe92:354e) has joined
  60. * Phanes has quit (Changing host)
  61. * Phanes (Phanes@surro/founder/phanes) has joined
  62. <Contessa> minibar, do you mean updating the author date of the commit to the commit date?
  63. * BenderRodriguez (~Foxhoundz@unaffiliated/foxhoundz) has joined
  64. <minibar> Contessa prevent the commit date to be changed by rebasing
  65. * oxymoron93 (935b012c@gateway/web/cgi-irc/kiwiirc.com/ip.147.91.1.44) has joined
  66. <minibar> keep it the same as the author date
  67. <dminuoso> Contessa, I was hoping for something along the lines of https://gist.github.com/anonymous/b9021184fd3b6270ad5c3d95157ea10f
  68. * mizu_no_oto (~textual@c-24-60-15-130.hsd1.ma.comcast.net) has joined
  69. <dminuoso> Contessa, I dont know how to describe other than "I want to play lego with multiple branches"
  70. <Contessa> lol yeah, I see what you mean
  71. <Contessa> I haven't seen such an option before in git rebase. Let me look through the docs for it
  72. <buggaboosanchez> You can't create multiple branches wiht a single statement? eg: git branch branch-1 branch-2 ... branch-n
  73. <Contessa> minibar, I think that functionality is baked into git. I don't know if there is such a configuration
  74. <buggaboosanchez> Is there another way to create branches where you can do that?
  75. * jeffreylevesque_ (~chatzilla@pool-108-45-74-97.washdc.fios.verizon.net) has joined
  76. <minibar> Contessa the git-rebase has the --committer-date-is-author-date option
  77. * glaeqen has quit (Remote host closed the connection)
  78. <Contessa> ooh
  79. * nivag_ (~gavin@SA5-nat-97.anu.edu.au) has joined
  80. <Contessa> btw dminuoso I don't think you can do it in one step
  81. * jeffreylevesque has quit (Ping timeout: 260 seconds)
  82. <dminuoso> Contessa, just figuring out the order in which to do things would be very... interesting.
  83. <Contessa> minibar, it looks like that option does what you want it to do
  84. <Contessa> It's also present in 'git am'
  85. <Contessa> https://git-scm.com/docs/git-am
  86. <minibar> Contessa would like it to make it default
  87. <Contessa> looking through the docs
  88. * mizu_no_oto has quit (Quit: Computer has gone to sleep.)
  89. <Contessa> minibar, looks like there is an environment variable that does this, as mentioned here: https://stackoverflow.com/questions/28536980/git-change-commit-date-to-author-date
  90. <Contessa> can you test it out and see if it works?
  91. * mizu_no_oto (~textual@c-24-60-15-130.hsd1.ma.comcast.net) has joined
  92. <buggaboosanchez> It's too hard to learn a for loop in bash that works. This is what keeps me in the dark ages when it comes to programming
  93. <Contessa> bash scripting is annoying :P
  94. <dminuoso> Contessa, something like that would be the holy grail of git. I mean git rebase interactive is extremely great already, its probably one of my most frequently used things in git.
  95. <buggaboosanchez> If I woulda just exectue the command 3 times I'd be done 10 times by now and no stress cause I already know how to do that. If I engage learning how to automate the process I'm here under mass pressure trying to understand something I have no clue about and 3 days later I might be able to execute one successful command. Grr
  96. <buggaboosanchez> story of my life
  97. * n1amr (~n1amr@41.47.5.91) has joined
  98. <Contessa> buggaboosanchez, have you learned any other programming languages?
  99. * Brain (~brain@cpc4-mfld16-2-0-cust466.13-1.cable.virginm.net) has joined
  100. <dminuoso> Contessa, I mean most of git is just about manipulating commits to obtain some desired shape - and git rebase -i is exactly what. Something along this lines ought to have been been discussed before
  101. <buggaboosanchez> Contessa: C then C++ (and I'll never go to C again). Then just piddled with a few web langs and with bash
  102. <buggaboosanchez> nothing spectacular
  103. * aard has quit (Read error: Connection reset by peer)
  104. <buggaboosanchez> The form of the logic is different between bash and C++ With bash it's for <some var> in < idk what >
  105. <Contessa> buggaboosanchez, you should be able to write a C++ program that calls the shell
  106. <buggaboosanchez> ^ nothing like C++ for loop at all
  107. <Contessa> so that you can iterate over git commands
  108. <Contessa> I think there's a 'shell' method in one of the standard C libraries
  109. <buggaboosanchez> C++ is a compiled lang, that would be cumbersome
  110. * YuGiOhJCJ has quit (Quit: YuGiOhJCJ)
  111. <Contessa> dminuoso, totally
  112. <buggaboosanchez> right on
  113. * Mutter (~Mutter@99-59-232-184.lightspeed.irvnca.sbcglobal.net) has joined
  114. * Mutter has quit (Client Quit)
  115. * highkix has quit (Ping timeout: 252 seconds)
  116. <dminuoso> buggaboosanchez, C++ then Haskell (and Ill never go to C++ again).
  117. * SkyPatrol (~SkyPatrol@dsl51B6F885.fixip.t-online.hu) has joined
  118. <Contessa> Haskell is <3
  119. * n1amr (~n1amr@41.47.5.91) has left
  120. <dminuoso> All those things that deeply pissed me off in C++ were done right in Haskell as far as I can tell, though Im still very fresh. :)
  121. <Contessa> but for such a simple script, the language isn't really that important. It's just a few lines really
  122. <Contessa> call it 'git-multibranch' or something
  123. * Oatmeal has quit (Ping timeout: 260 seconds)
  124. * SkyPatrol_ has quit (Ping timeout: 240 seconds)
  125. * glad has quit (Remote host closed the connection)
  126. * fstd has quit (Read error: No route to host)
  127. * fstd (~fstd@unaffiliated/fisted) has joined
  128. * coco has quit (Quit: WeeChat 1.9)
  129. * Phylock has quit (Ping timeout: 240 seconds)
  130. * King_Hual has quit (Ping timeout: 240 seconds)
  131. * a3Dman has quit (Ping timeout: 240 seconds)
  132. * robinb (~robinb@2400:2412:6e0:4000:7977:6e8c:5fed:d5dd) has joined
  133. * ZyX-I has quit (Ping timeout: 246 seconds)
  134. * FlyingJester (~kashyyyk@2602:306:31c4:2820:6890:4925:697d:7654) has joined
  135. <FlyingJester> So, I'm having a problem where `git push origin branch` does nothing at all (doesn't even print anything). I don't think I'm in detached head mode, but I have no idea what is happening.
  136. * chachasmooth has quit (Ping timeout: 240 seconds)
  137. * chriys (~chriys@96.127.232.172) has joined
  138. * robinb has quit (Ping timeout: 252 seconds)
  139. * ahr3n (~textual@113.172.2.234) has joined
  140. * chachasmooth (~chachasmo@unaffiliated/chachasmooth) has joined
  141. * a3Dman (~3Dman@unaffiliated/a3dman) has joined
  142. * upperdeck has quit (Ping timeout: 248 seconds)
  143. * chriys has quit (Ping timeout: 260 seconds)
  144. * dsantiago has quit (Quit: Computer has gone to sleep.)
  145. <Contessa> FlyingJester, what do you see when you type 'git remote show origin'?
  146. * dege has quit (Quit: Damage is done, this is fun)
  147. <FlyingJester> Contessa: Nothing at all.
  148. <FlyingJester> My config, if it helps... https://gist.github.com/FlyingJester/330a22f948cd2aa8a69f2ea97b243865
  149. <Contessa> FlyingJester, I'm guessing you have your real email there instead of <LOL>, right?
  150. <FlyingJester> Yeah.
  151. <Contessa> can you run 'git fetch' FlyingJester ?
  152. <FlyingJester> I have, and nothing is printed.
  153. * funkytwig (~funkytwig@cpc124780-aztw29-2-0-cust179.18-1.cable.virginm.net) has joined
  154. <Contessa> FlyingJester, what if you go to another directory, create a repository that is hosted online
  155. <Contessa> and try to push/fetch to that?
  156. <FlyingJester> I have another repo that works fine with this git setup, is that what you mean?
  157. * upperdeck (~upperdeck@n218103180187.netvigator.com) has joined
  158. <Contessa> yeah, just checking if it's global or repo-specific
  159. <Contessa> FlyingJester, has this always happened or did it start recently?
  160. <FlyingJester> Well, I do have my config local for both repos.
  161. <FlyingJester> I've not used this repo since I reinstalled git on this machine.
  162. <funkytwig> Hi, ive just lost a days work. I added files, did a commit and a push (in develop) then checkout master and merge develop. Now everythnig I did is gone. Any ideas?
  163. <Contessa> what git version are you running?
  164. * fstd has quit (Read error: Connection reset by peer)
  165. * fstd (~fstd@unaffiliated/fisted) has joined
  166. <funkytwig> 2.7.4
  167. <Contessa> funkytwig, I guess you were on some 'branchA' and then checked out master?
  168. <Contessa> if so, do you see this branch when you run 'git branch'?
  169. <funkytwig> Contessa, I was in develop, did a commit and a push, then checkout master
  170. <Contessa> do you see the commit remotely?
  171. <funkytwig> Contessa, sorry, dont follow
  172. * gugah (~gugah@181.28.219.193) has joined
  173. * gugah has quit (Max SendQ exceeded)
  174. <oxymoron93> if you did the commit, then there is no way you lost your changes
  175. <Contessa> Can you access the online version of the repository funkytwig ?
  176. <Contessa> exactly oxy. It must be online
  177. * gugah (~gugah@181.28.219.193) has joined
  178. <funkytwig> Contessa, yes, let me have another look at bitbucket but fairly sure it is all gonr
  179. <Contessa> just thinking aloud, but someone could have force-pushed
  180. <funkytwig> Contessa, it says last update 21 houred ago
  181. <Contessa> is that yours?
  182. <funkytwig> let me gist the git history
  183. <Contessa> also, that's the develop branch?
  184. <Contessa> Make sure you're looking at develop, not master
  185. <funkytwig> Contessa, the overview for the whole depository says last update 31 hours ago
  186. <Contessa> 31 or 21?
  187. <Contessa> funkytwig, actually, what do you see when you run this command locally? 'git log develop --decorate --graph --oneline'
  188. <funkytwig> sorry, meant 21
  189. <Contessa> do you see your changes there?
  190. * piremi (~jimmy@220.116.161.106) has joined
  191. <buggaboosanchez> I keep getting myself into this situation and not learning how to fix it. I rename a file with the bash command 'mv" and git says there's a new untracked file. . Can I just reflect the name change in the commit message and that's good enough?
  192. <funkytwig> no
  193. <buggaboosanchez> funkytwig: What do you do?
  194. <Contessa> buggaboosanchez, 'git mv'
  195. <buggaboosanchez> Contessa: Yes I should have thought to do it properly.
  196. <buggaboosanchez> I got this ( I thhink )
  197. <Contessa> git should be able to handle it even using 'mv' though
  198. <Contessa> just add the untracked file
  199. <Contessa> and make sure everything looks good in the staging area
  200. <Contessa> funkytwig, let's just go over your workflow again
  201. <Contessa> You were on develop
  202. <Contessa> you commit some changes
  203. <Contessa> so now you have several commits or so on develop (or maybe just one)
  204. <Contessa> You push this change to remote using 'git push origin develop'
  205. <funkytwig> Yes, just let me check the sistory
  206. <funkytwig> Yes, just let me check the history
  207. <Contessa> You then check out master using 'git checkout master', then run 'git merge develop'.
  208. <Contessa> ok
  209. <buggaboosanchez> I'm gonna delete the file (since it's just an empty file - initially committed) , make the new properly named one , and reflect it all in my commit messages
  210. <funkytwig> 1783 git commit -m "fix missing files"
  211. <funkytwig> 1784 git push
  212. <funkytwig> 1785 git status
  213. <funkytwig> 1786 git checkout master
  214. <funkytwig> 1787 git merge develop
  215. <funkytwig> 1788 git status
  216. <funkytwig> 1789 git push
  217. <oxymoron93> funkytwig use paste tool next time :)
  218. <Contessa> funkytwig, were those files staged at the time?
  219. <funkytwig> OK, sorry
  220. <Contessa> for line 1783
  221. * Tobbi (~Tobbi@supertux/tobbi) has joined
  222. <funkytwig> Contessa, yes, I added all the stuff
  223. <oxymoron93> would commit pass without staged file/s?
  224. <buggaboosanchez> If a change isn't staged then what that change is can be changed without affecting the status of git status - right? I mean, "change" is ambiguous to git prior to staging?
  225. <Contessa> and you cannot see your commit on your local copy of develop funkytwig ?
  226. <Contessa> git log develop
  227. * Cabanossi has quit (Ping timeout: 276 seconds)
  228. <funkytwig> Contessa, how do I check that
  229. <Contessa> type 'git log develop'
  230. * Cabanossi (~Cabanossi@pC19F2D04.dip0.t-ipconnect.de) has joined
  231. <buggaboosanchez> Holy shit - I'm digging myself a hole with this thing. I do bash command "rm" on the file and git status comes back clean - what?
  232. <Contessa> what did you have in your working area/staging area before buggaboosanchez ?
  233. <buggaboosanchez> there is a difference git ought to be picking up (where once there was a file [with the old name] there now is no file at all)
  234. * a3Dman has quit (Ping timeout: 240 seconds)
  235. <Contessa> buggaboosanchez, so you started off with some 'fileA' in your repo
  236. <funkytwig> Contessa, no, the comit is not mentioned, even though I can see it in linux history
  237. <Contessa> do you have the old commit id funkytwig ?
  238. <funkytwig> Contessa, how do I get that?
  239. <Contessa> do you see it in your console history funkytwig ?
  240. <buggaboosanchez> I had a single file in a directory under the main repo dir. I had forgotten to add the .cpp ending. I used bash command "mv" to change the file and git status picked it up as a new file. I went and used bash command "rm" to delete the file and git status comes back clean. That's where I'm at atm
  241. * dfee (~dfee@cpe-70-95-143-62.san.res.rr.com) has joined
  242. * fstd has quit (Read error: Connection reset by peer)
  243. * fstd (~fstd@unaffiliated/fisted) has joined
  244. <Contessa> but it doesn't see the old file even though it's been deleted, right buggaboosanchez ?
  245. <Contessa> try 'git checkout path/to/file'
  246. * dermoth has quit (Ping timeout: 268 seconds)
  247. * dermoth (~dermoth@gateway/tor-sasl/dermoth) has joined
  248. <buggaboosanchez> Contessa: That seems like a reasonable assessment
  249. <buggaboosanchez> Seems like that could cause something like this
  250. <Contessa> does it work?
  251. <buggaboosanchez> let me see
  252. <funkytwig> Contessa, it looks like I have host of the important stuff in aptana but this is really freaking my out.
  253. <Contessa> funkytwig, are you sure you didn't do anything other than those commands?
  254. <Contessa> Are you in the correct repository?
  255. <funkytwig> Contessa, that was the console histoey I pasted earlier
  256. <Contessa> you didn't switch directories or anything?
  257. <funkytwig> let be gits history | grep git
  258. <buggaboosanchez> Contessa: Let me make sure we are clear on this. Right now there is no file (I deleted it). For me to do git checkout <path to file> would be exactly "git checkout ./" (because I'm in the dir and is linux)
  259. <buggaboosanchez> Is that ^ right to do?
  260. <Contessa> I think so, not sure
  261. <buggaboosanchez> cant get any worse :)
  262. <Contessa> you're sure you don't have the file set to --skip-worktree or ignored?
  263. * dfee has quit (Ping timeout: 240 seconds)
  264. <buggaboosanchez> I borked my repo
  265. <buggaboosanchez> That doesn't work Contessa
  266. <Contessa> git ls-files -v | grep ^S
  267. <Contessa> what do you see buggaboosanchez ?
  268. <buggaboosanchez> Contessa: There is no output
  269. <funkytwig> Contessa, https://gist.github.com/funkytwig/8d232f63e49df198a7ca88a097c2c2ae
  270. * dsantiago (~dsantiago@cpe-104-175-193-69.socal.res.rr.com) has joined
  271. * roelmonnens (~roelmonne@ptr-4oprt7byx60cw3bepvs.18120a2.ip6.access.telenet.be) has joined
  272. <buggaboosanchez> Contessa: This is a newly created repo and that was the second of two files created in it
  273. <Contessa> you don't even see it in viewtest funkytwig ?
  274. <Contessa> no .gitignore either, right buggaboosanchez ?
  275. <hlieberman> I've got a weird git problem that I can't figure out. I'm trying to merge tag XYZ into branch foo, aggressively discarding all changes on the branch foo in favor of those on XYZ. I would expect `git merge XYZ -s recursive -X theirs && git diff XYZ` to return no output... but there are lots of changes.
  276. <hlieberman> Any ideas?
  277. <buggaboosanchez> Contessa: Hadn't created on (I have in the past, just not yet on this one)
  278. * a3Dman (~3Dman@unaffiliated/a3dman) has joined
  279. <Contessa> buggaboosanchez, do you see the file if you run 'git log --raw'?
  280. * om_henners has quit (Quit: ZNC 1.6.5 - http://znc.in)
  281. * om_henners (~om_henner@203-174-131-138.mel.static-ipl.aapt.com.au) has joined
  282. <buggaboosanchez> Contessa: I don't think I ever initially committed that empty file. I must have noticed the file extension was missing, started mutating stuff outside git, and wondered git status was saying what it was each time
  283. * roelmonnens has quit (Ping timeout: 255 seconds)
  284. <Contessa> if it was never committed, then git doesn't keep track of it
  285. <buggaboosanchez> I'm so new to git I don't think of the connection at all
  286. <Contessa> The only way for git to keep track of something is for you to commit it
  287. <buggaboosanchez> Contessa: thanks for helping me see what's up
  288. <Contessa> np :-)
  289. <buggaboosanchez> Doh!
  290. * Brain has quit (Ping timeout: 240 seconds)
  291. <Contessa> funkytwig, what is your push configured to use? 'simple'?
  292. * finalbeta has quit (Ping timeout: 264 seconds)
  293. * Oatmeal (~Suzeanne@gateway/vpn/privateinternetaccess/suzeanne) has joined
  294. <funkytwig> Contessa, ok, its in viewtest
  295. * mizu_no_oto has quit (Quit: Computer has gone to sleep.)
  296. <Contessa> awesome
  297. * funkytwig jumping up and down yelling yes
  298. * chachasmooth has quit (Ping timeout: 252 seconds)
  299. <Contessa> XD
  300. <funkytwig> Contessa, never before has awesome felt so understated, thanks for your help.
  301. <Contessa> np :-)
  302. <funkytwig> Contessa, is hter a way for me to add my branch to my pronmpt
  303. <Contessa> what do you mean by your prompt?
  304. <funkytwig> Y
  305. <Contessa> Do you want to add your change to develop?
  306. * chachasmooth (~chachasmo@unaffiliated/chachasmooth) has joined
  307. <funkytwig> Yes, and master, but i'me going to do a tar backup first;).
  308. <Contessa> just do 'git push -u origin viewtest'
  309. <buggaboosanchez> I can't be in a sub dir and issue "git branch" to get a list of branches? ( It errors out )
  310. <Contessa> that way your viewtest branch is online
  311. <funkytwig> Contessa, thought I had alreay checked viewtest
  312. * preyalone has quit (Quit: Connection closed for inactivity)
  313. <buggaboosanchez> I had to back out 3 levels and then issue the command before it would work
  314. <Contessa> for merging into develop, it depends on your company policy
  315. * MutantMahesh (~msankhala@unaffiliated/msankhala) has joined
  316. <Contessa> you may need to create a pull request, or you could do it directly with 'git rebase develop; git checkout develop; git merge viewtest'
  317. <Contessa> funkytwig, ^^^
  318. * askb (~askb@60-240-105-249.static.tpgi.com.au) has joined
  319. <Contessa> buggaboosanchez, that's strange
  320. <MutantMahesh> Is there single command to checkout new local branch and create remote tracking branch at the same time?
  321. <Contessa> but I don't usually work with git in a subdirectory
  322. <buggaboosanchez> Contessa: tell me about it
  323. * bronson (~bronson@50-1-98-33.dsl.dynamic.fusionbroadband.com) has joined
  324. <Contessa> MutantMahesh, you can create a local branch that tracks an existing remote branch with 'git checkout -b branchname -t remotebranch'
  325. <funkytwig> Contessa, thanks, so if I do 'git push -u origin viewtest' it puts the branch in bitbucket?
  326. <Contessa> but to create a remote branch you have to push first
  327. * mizu_no_oto (~textual@c-24-60-15-130.hsd1.ma.comcast.net) has joined
  328. <Contessa> yes funkytwig
  329. <MutantMahesh> @Contessa Thanks make sense.
  330. <Contessa> :-)
  331. <buggaboosanchez> wtf! Am I being hacked?! The entire "code" directory is missing (which is where that file was located that I was talking about earlier
  332. <Contessa> what branches do you have buggaboosanchez ?
  333. <Contessa> 'git branch'
  334. <buggaboosanchez> I'm sure it has something to do with the way I'm using git (branching stuff) and I don't understand something about it.
  335. <Contessa> Branching allows you to have different working directory states
  336. <Contessa> so you can have directories that appear and disappear out of nowhere depending on the branch you're in
  337. * Cabanossi has quit (Ping timeout: 246 seconds)
  338. <buggaboosanchez> Contessa: Idk how to represent the answer to that. There's 3 right off master (testing development and docs) then off of develpment there are several linearlly branch on branch
  339. <oxymoron93> represent with pastebin
  340. <Contessa> buggaboosanchez, try 'git branch -v'
  341. <buggaboosanchez> Contessa: It shouldn't delete a dir though right? (git doesn't track dirs)
  342. * dsdeiz has quit (Read error: Connection reset by peer)
  343. buggaboosanchez bremner babilen BackEndCoder bailon bambams barq barteks2x bathtub_shark batrick Baughn bauruine bbhoss bcc bdesmet beaky beerdrop belak BenderRodriguez Bengi Bercik bergice_ berndj beuker biancat bibek22 Bigcheese bigjazzsound binary106 BinGOs bipolar bitmod bittyx_ bjoe2k4_ bket bl0m1 BlackPanx blackwell bladdezz blahdodo BlessJah Blkt bluepixel blueyed blunaxela Bobdude Bock bodie_ Bombe bond BooK bordeaux_facile boshhead boxrick Brando753-o_O_o briankc brokensyntax bronson bs bsanford bttf butterthebuddha bwn byte512 BytesBacon
  344. <Contessa> It can buggaboosanchez
  345. * bronson has quit (Ping timeout: 248 seconds)
  346. <Contessa> and checking out the branch will restore it
  347. * Cabanossi (~Cabanossi@pC19F2D04.dip0.t-ipconnect.de) has joined
  348. <funkytwig> Contessa, were you saying I need to do another push. bitbucket says last update very recently but branch not showing ip.
  349. <Contessa> funkytwig, refresh bitbucket and look through the branches on bitbucket
  350. * natechan (~natechan@2602:306:ce68:4290:f520:bbec:6752:e21c) has joined
  351. <buggaboosanchez> Contessa: Contessa, it can what? Git can track dirs? Dirs can be deleted by git? Or both and ??
  352. <funkytwig> Contessa, just saw you said i have to push FIRST but I did not;(
  353. <oxymoron93> any content can be tracked by git
  354. <Contessa> buggaboosanchez, git tracks files and their filepaths.
  355. <buggaboosanchez> Contessa: hold on I see what you saying
  356. <Contessa> funkytwig, do you see it after you push?
  357. * mizu_no_oto has quit (Quit: Computer has gone to sleep.)
  358. <buggaboosanchez> Contessa: Well I'll be a .... wow! It does do that!
  359. * robinb (~robinb@2400:2412:6e0:4000:7977:6e8c:5fed:d5dd) has joined
  360. <Contessa> it's like magic :P
  361. <funkytwig> Contessa, shall I do another push
  362. * neightchan (~natechan@2602:306:ce68:4290:1dd2:5715:68dd:e8bf) has joined
  363. <oxymoron93> no need for that
  364. <Contessa> you don't see viewtest even after pushing viewtest funkytwig ?
  365. <buggaboosanchez> Did git change? (afaik) The issue of having git track dirs has come up from time to time throughout it's existance. This looks like that. Is it?
  366. * feodoran_ (~quassel@p4FD27F52.dip0.t-ipconnect.de) has joined
  367. * feodoran is now known as Guest54549
  368. <Contessa> buggaboosanchez, git is just tracking the files afaik. So if fileA is in ./code/ then git sees it as ./code/fileA
  369. * feodoran_ is now known as feodoran
  370. <buggaboosanchez> but If I merge that branch then I bet the changes show up in the branch i merged into :)
  371. * ShalokShalom has quit (Ping timeout: 260 seconds)
  372. <funkytwig> I did git push -u origin viewtest and the last updated time changed but cant see branch
  373. * dsdeiz (~dsdeiz@49.151.121.114) has joined
  374. * dsdeiz has quit (Changing host)
  375. * dsdeiz (~dsdeiz@drupal.org/user/447770/view) has joined
  376. <Contessa> yes buggaboosanchez
  377. <Contessa> you cannot see the branch in Bitbucket funkytwig ?
  378. <funkytwig> Contessa, no
  379. <Contessa> are you able to see develop in Bitbucket funkytwig ?
  380. <buggaboosanchez> well this is blowing git wide open for me (like file management 20 yrs ago when someone said just the right / needed thing that blew it open for me)
  381. * thiago (~thiago@kde/thiago) has joined
  382. <Contessa> at its core, git is really simple but really powerful
  383. * webdev007 (~webdev007@45.72.241.78) has joined
  384. * natechan has quit (Ping timeout: 246 seconds)
  385. <Contessa> it's all about DAGs :P
  386. * jost__ has quit (Remote host closed the connection)
  387. * Guest54549 has quit (Ping timeout: 248 seconds)
  388. <funkytwig> Contessa, viewtest in bitbucket now, guess it take a little time for there website to update
  389. <Contessa> awesome
  390. <Contessa> funkytwig, this is personal or corporate development?
  391. * robinb has quit (Ping timeout: 255 seconds)
  392. <Contessa> if it's corporate then you need to consult their policies on merging into develop and master
  393. <FlyingJester> Interesting. So, I did a new checkout, and everything worked until I made a commit, and now I have the same issue again.
  394. <funkytwig> Contessa, so should I checkout to develop, merge, push, then checkout to master,merge, push
  395. * SkyPatrol_ (~SkyPatrol@netacc-gpn-7-138-113.pool.telenor.hu) has joined
  396. <FlyingJester> It's interesting that `git push origin branch` says nothing, since I do not have a password saved.
  397. <funkytwig> Contessa, ime currently only developing lovably, nothing gone live
  398. funkytwig fuchstronaut Furai fury fury_ fuzzmz
  399. <Contessa> yes funkytwig
  400. <Contessa> FlyingJester, do you mean a clone?
  401. <Contessa> or a checkout?
  402. <FlyingJester> Yeah, sorry, a new clone.
  403. <Contessa> do your local git commands word? e.g. 'git log'
  404. <Contessa> *work
  405. * SkyPatrol has quit (Ping timeout: 240 seconds)
  406. <FlyingJester> Yes, git log works.
  407. <oxymoron93> what happened with git commit ?
  408. <FlyingJester> git fetch, pull, diff, etc all just do nothing at all.
  409. <Contessa> even diff?
  410. * mizu_no_oto (~textual@c-24-60-15-130.hsd1.ma.comcast.net) has joined
  411. <FlyingJester> Yeah, even diff does nothing at all.
  412. <Contessa> FlyingJester, have you tried diffing against wildly different commits?
  413. * Ardethian\ has quit (Read error: Connection reset by peer)
  414. <Contessa> e.g. git diff HEAD~20
  415. <funkytwig> Contessa, to answer your previous question personal
  416. <FlyingJester> Ah, sorry, I had forgotten how git diff works :X Yeah, git diff works properly.
  417. <Contessa> awesome :-)
  418. * Ardethian\ (~tkore@unaffiliated/ardethian) has joined
  419. <Contessa> let me check the docs
  420. <Contessa> FlyingJester, are you using SSH or HTTP or HTTPS?
  421. * Murr has quit (Remote host closed the connection)
  422. <Contessa> also, what if you try `git fetch -v`?
  423. * Murr (~Murr@212-51-143-40.fiber7.init7.net) has joined
  424. <FlyingJester> Interestingly, git remote show does show 'origin', which makes sense given the results of config, but then prints nothing for `git show remote origin`. Trying a nonsense remote, like `git remote show asdf` does say that it's not valid.
  425. <FlyingJester> I'm using https
  426. <FlyingJester> `git fetch -v` also prints nothing at all.
  427. <buggaboosanchez> what happens after someone does git reset HEAD^ in order to undo the last commit? I mean what happens to the data stored in memory? Does it get freed ever? And by what? My OS, or by git?
  428. <Contessa> Does the command halt immediately or does it take time FlyingJester ?
  429. <Contessa> buggaboosanchez, it eventually gets freed when you run `git gc`
  430. <FlyingJester> Contessa It's basically instant. Way faster than doing a git fetch on the other local repo I have that works.
  431. * mikecmpbll has quit (Quit: inabit. zz.)
  432. <Contessa> wait, give me that config again FlyingJester
  433. <funkytwig> Contessa, OK, ive got the changes in develop online, so when I go to master do I merge develop (guess if I merged viewtest it would do same thing)
  434. * YuGiOhJCJ (~YuGiOhJCJ@gateway/tor-sasl/yugiohjcj) has joined
  435. <Contessa> Yes funkytwig
  436. <FlyingJester> Contessa: https://gist.github.com/FlyingJester/3888930d8c1ca880d678538f266b44d0
  437. <FlyingJester> All options are local, nothing in system or global.
  438. <buggaboosanchez> Contessa: Read - git gc does bookkeeping / housekeeping stuff
  439. <FlyingJester> And no saved passwords or usernames.
  440. <Contessa> gc = garbage collection buggaboosanchez
  441. <Contessa> FlyingJester, I'm just looking at the URLs in there
  442. <buggaboosanchez> Contessa: It runs automatically?
  443. * jnewt_ has quit (Quit: Leaving)
  444. <Contessa> it can buggaboosanchez but it will tell you
  445. <Contessa> FlyingJester, what if you clone using ssh?
  446. <funkytwig> Contessa, hit my first merge conflict, this is exiting;)
  447. <Contessa> :P
  448. <FlyingJester> I haven't edited them on this clone, it's what I cloned using (and that worked, as well as a single push). And I compared it with the working repo, it didn't look suspicious to me.
  449. <FlyingJester> Contessa: Aren't ssh clones read only?
  450. <Contessa> funkytwig, that's why I like to rebase my branch on top of what I'm going to be merging it into first, to avoid having too many conflicts.
  451. <Contessa> nope FlyingJester
  452. <FlyingJester> Well, ok then. I'll give it a try
  453. * jcstach_ (~jcstach@pool-100-14-220-47.phlapa.fios.verizon.net) has joined
  454. <buggaboosanchez> Contessa: cool stuff man
  455. * jpcrs (~jpcrs@189.62.2.245) has joined
  456. <Contessa> buggaboosanchez, you can also recreate a deleted branch by using the commit id before it's garbage collected
  457. * brent__ (~brent@c-73-202-92-62.hsd1.ca.comcast.net) has joined
  458. <funkytwig> Contessa, no biggie, looking at file and it seems obvious. So I need to alter file, commit and do merge again
  459. <oxymoron93> no merge, just git add and git commit
  460. <Contessa> you're in the CONFLICT stage, right? So you just need to make your change, run 'git add' then commit
  461. <Contessa> ^^^
  462. <funkytwig> Contessa, yes
  463. <FlyingJester> Contessa: I'm getting a "cannot read from remote repository", but I'm not really sure it's related to this issue directly.
  464. <Contessa> that's on an SSH clone attempt FlyingJester ?
  465. <FlyingJester> Contessa: Yes. Works fine with https.
  466. <Contessa> do you have any SSH keys configured with your repo FlyingJester ?
  467. * SkyPatrol (~SkyPatrol@dsl51B6F885.fixip.t-online.hu) has joined
  468. <Contessa> actually, let me try to clone it via ssh
  469. <FlyingJester> Probably not...and that would explain it, wouldn't it.
  470. <Contessa> it shouldn't need one
  471. * SkyPatrol_ has quit (Ping timeout: 240 seconds)
  472. * brent__ has quit (Ping timeout: 248 seconds)
  473. <Contessa> I got a permission denied error FlyingJester
  474. <FlyingJester> Interesting.
  475. * dc_99 has quit (Ping timeout: 255 seconds)
  476. <Contessa> https://prnt.sc/ggppvr
  477. <FlyingJester> Same thing I get :S
  478. <Contessa> Look into your Github settings FlyingJester
  479. <Contessa> see if you can find anything related to SSH in there?
  480. * mostlybadfly (uid10066@gateway/web/irccloud.com/x-rjlxbizgxamkjwlu) has joined
  481. <FlyingJester> is "deploy keys" related?
  482. <FlyingJester> Or do I need to add myself as a collaborator?
  483. * eb0t has quit (Quit: WeeChat 1.4)
  484. <Contessa> don't you already own the repo?
  485. <Contessa> you shouldn't need to add yourself
  486. <FlyingJester> I do own it, but the collaborator list is empty. Nothing seems unusual, so unless I need to do something with "deploy keys" I'm not sure what I would change.
  487. <funkytwig> Contessa, all done, thanks for you help I FRIGGING LOVE IRC, will look up rebase
  488. <Contessa> np!
  489. <oxymoron93> this channel rocks yes, rebase rocks too imo
  490. <FlyingJester> I mean, it looks like deplot keys is just adding SSH keys.
  491. <Contessa> FlyingJester, let me look into the github docs
  492. <Contessa> FlyingJester, https://help.github.com/articles/error-permission-denied-publickey/
  493. * dsantiago has quit (Quit: Computer has gone to sleep.)
  494. <FlyingJester> Interesting, ssh -T git@github.com prints "Permission denied (publickey)."
  495. * cagedwisdom has quit (Ping timeout: 264 seconds)
  496. * text1 (~safe@unaffiliated/safe) has joined
  497. <FlyingJester> I think I just don't have ssh set up properly on this machine (no public key), I haven't used it since I reinstalled Cygwin.
  498. <Contessa> hmm, maybe. I'm on a Windows machine too so I can't verify
  499. * safe has quit (Ping timeout: 260 seconds)
  500. * nivag_ has quit (Ping timeout: 248 seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement