[15:00:17] [## Class Started at Mon Jul 11 15:00:17 2016 ##] [15:00:17] startclass [15:00:22] Roll Call [15:00:24] Deepanshu Kapoor [15:00:27] Mayank Gupta [15:00:27] Jogender Kota [15:00:27] Akhilesh Dhaundiyal [15:00:29] Mahesh Gahlot [15:00:30] Priyanka Sharma [15:00:31] Yashwanth M [15:00:31] Harsh Vardhan [15:00:34] Alakshendra Yadav [15:00:36] K Sai Kiran [15:00:37] Varsha R [15:00:38] Satyajit Bulage [15:00:38] Avik Mukherjee [15:00:39] Sudeep Mukherjee [15:00:51] Buvanesh Kumar [15:00:51] Anupama Mandal [15:00:56] Akshay shipurkar [15:00:56] Mahendra Yadav [15:01:00] Rohan Hazra [15:01:05] Krishna Biradar [15:01:05] Mriyam Tamuli [15:01:05] Suraj Narwade [15:01:18] Amit Kokitkar [15:01:18] shobhit upadhyay [15:01:24] Moiz Sajid [15:01:34] Aniket Khisti [15:01:43] joyita chakraborty [15:01:44] Amol Kahat [15:01:57] Kamlesh Chaudhari [15:02:00] snehal karale [15:02:23] Akash Mishra [15:02:26] Pabitra Pati [15:02:26] Rhitik Bhatt [15:02:35] Rahul Bhattacharjee [15:03:22] Questions? [15:03:31] Madhuri Muley [15:03:59] ! [15:04:10] next [15:04:19] ! [15:04:23] next [15:04:38] what are bare repos [15:04:48] what is the use if they don;t allow local modification [15:04:54] sayan, i couldn't understand what are localized and centralized VCS. [15:04:57] Roll call: Prashant Jamkhande [15:05:13] pabitra: did you google the exact term? [15:05:24] yes... I did [15:05:33] but can't understand [15:06:24] i realized that we all use non-bare repos [15:06:25] Roll Call: Shantanu Acharya [15:06:47] but I still can't get what is the use of bare repos if user can't modify any files in it [15:07:03] Rollcall : Vaibhav Jain [15:07:40] Roll call : poonam jadhav [15:07:42] pabitra, generally bare repos are at git server [15:08:15] sorry got ping in other channel [15:08:49] only used for git server ?? [15:08:58] pabitra: yes [15:09:04] ok [15:09:05] is session started ? [15:09:14] thanks snarwade [15:09:21] sayan, :) [15:09:22] snarwade, thanks [15:09:28] ! [15:09:30] sandy_, yes [15:09:31] priyanka: you will understand that in few minutes [15:09:33] next [15:09:35] next [15:09:47] okay sayan. [15:10:11] what is staging ?? if out of 20 files I select 10 files for commit is that called i am staging 10 fikes [15:10:12] ?? [15:10:58] pabitra, staging is a preparatory stage before committing changes to repository. [15:11:21] pabitra: so there are four stages [15:11:23] yes I know that... that's understood from what was written vharsh [15:11:48] You can commit( & monitor) changes to file you stage. [15:12:26] open this image: https://rkbookreviews.files.wordpress.com/2011/11/clip_image004_thumb4.jpg?w=474&h=271 [15:12:32] I will explain the same [15:12:53] ok [15:12:54] staging is just before commit [15:13:04] so you initialize your git directory with `git init` [15:13:17] and all the files are in untracked staged [15:13:21] when you add files using git add, you staged files for commiting [15:13:27] that means those are not tracked by git [15:13:56] once you add those files using git add, they start getting tracked by git untill removed [15:14:23] ok... got it... [15:14:25] once started to get tracked they move around the stages unmodified, modified and staging [15:15:01] sayan, so once added they are not even staged also ?? [15:15:06] once you start modifying the file it foes to modified [15:15:17] s/foes/goes [15:15:50] then once you add the modified files they go to stage [15:16:27] the files in stage are the files which will get commited on doing git commit [15:16:37] so git add' takes the files to staging mode ? [15:16:48] pabitra: yes [15:17:07] pabitra: for both untracked and modified [15:17:15] then what refers to tracked -- because it says commited not staged [15:17:15] swap 4 15 [15:17:22] sorry [15:17:59] how a file can be committed without staging or is it being committed in last checkin but not modified or staged for current checkin ?? [15:18:32] what do you mean by check in [15:18:40] sorry [15:18:46] pabitra: it cannot be commited without going through staged [15:18:46] ! [15:18:48] check-in means commit [15:19:20] once the file is commited it comes back to unmodified [15:19:20] sayan, but the defination of tracked says cmmited not staged [15:19:53] pabitra: link? [15:20:07] next [15:20:09] what if we add the file by git add. and modified it but than commit it ,what version of file will be saved v1 or v2 [15:20:23] http://www.vogella.com/tutorials/Git/article.html#gitdefintion_branching [15:20:29] section 2.3 [15:21:19] pabitra: tracked is basically unmodified in the picture I gave [15:21:50] sandy_: good question [15:22:00] ok [15:22:09] sandy_: once you do git add it goes to staging right [15:22:18] sayan: yes :) [15:22:34] and then if you change something those will be added to modified [15:22:49] to add those changes you need to add that file again using git add [15:22:59] or else they will not be committed [15:23:08] sandy_: got it? [15:23:25] next [15:23:29] sayan: yes got it ; sayan thank's [15:23:38] so more questions on Git? [15:23:41] ! [15:23:44] next [15:23:58] ! [15:24:03] next [15:24:16] detached head mode -- creation of commit doesnot move any branch [15:24:17] i search about fork but did not underrstand much [15:24:28] sayan, this is a bit unclear to me [15:24:29] sandy_: will explain today later [15:24:29] s/underrdtand/understand [15:24:36] sayan: ok [15:25:46] pabitra: http://gitolite.com/detached-head.html [15:26:15] okay... i will go through it [15:26:18] thanks sayan [15:26:29] ! [15:26:36] pabitra: and this https://www.git-tower.com/learn/git/faq/detached-head-when-checkout-commit [15:26:42] next [15:26:59] ! [15:27:10] next [15:27:39] what hash calculation for commit happens ?? is it like checksum for all files that are with git commit ?? [15:28:18] pabitra: yes kind off [15:28:42] ok.. [15:29:06] So now you all must be knowing basic of Git [15:29:28] atleast the basic commands like the git add, git commit, git log etc [15:29:46] yep :) [15:29:58] But how do you collaborate with others using git? [15:30:12] Using a common repo on a server. [15:30:18] github. [15:30:29] While collaborating you get a centralized git server which hosts the git repos [15:30:30] ! [15:30:51] you do all the operations on you local machine [15:31:00] and push the changes to this remote git server [15:31:14] There are various Git hosting services like [15:31:31] some git basics for beginners --> https://git-scm.com/book/en/v2/Getting-Started-Git-Basics [15:31:32] ! [15:31:45] Pagure, Github, Bitbucket, Gitlab , Sourceforge etc [15:32:08] Today we will be learning how create a repo on Github and collaborate [15:32:11] next [15:32:14] ! [15:32:15] next [15:32:21] i did not get by what this reference means [15:32:23] commit reference - simple ref and symbolic ref [15:32:30] ?? [15:32:59] like Github, Bitbucket etc [15:33:50] somewhere in beginning of link i have read git stores the files instead of deltas but in section 3.2 for blob, it says it stores delta... little bit confusion here [15:34:11] madhurii: did you read this ? https://git-scm.com/book/en/v2/Git-Internals-Git-References [15:34:18] searched the same which you asked? [15:34:55] i will check [15:35:06] sayan, thanks [15:35:19] pabitra: link? [15:35:34] http://www.vogella.com/tutorials/Git/article.html#gitdefintion_branching [15:35:37] Please everybody head to github.com and create and account [15:35:45] section 3.2 [15:35:46] kushal: Sorry for being late. Actually I was busy in solving a question in Codeforces and hardly watched at time. Sorry for being late [15:35:46] trishnag: ping! [15:35:52] Roll Call: Saurav Saha [15:36:01] those who already have an account please wait [15:36:20] Once done with creating your account please type done [15:36:29] Can anybody please tell me what is the topic going on today ? I joined late :( [15:36:34] Roll Call: Yogesh [15:36:45] /query SRvSaha: [15:36:46] SRvSaha, we're still discussing git [15:37:11] Alak Thanks [15:37:16] SRvSaha, ok so we are learning git and now we will learn how to use git and share your code with all on a server. [15:37:38] SRvSaha, so you might want to open a browser and create an account on github. [15:38:10] sandy_: ? [15:38:14] Alak: So is the discussion session going on about git from the article that was told to read that day? [15:38:41] done [15:38:44] Done [15:38:45] iyogeshjoshi: pong. session going on. pm me? [15:38:53] SRvSaha: nothing just want to tell you about the topic of session :) [15:38:56] trishnag++ [15:39:30] done [15:39:33] pabitra: where does it states that git stores files instead of deltas? [15:39:39] SRvSaha: yes ! [15:40:36] rahulbajaj: Ok thanks. [15:41:07] SRvSaha: but /query did not work : ) [15:41:19] anybody still working on creating the account? [15:41:26] sk_ is now known as ksaikiranr [15:41:35] i [15:41:49] sayan, section 1.1 :- Please note that this picture fits primarily to Git. Other version control systems like Concurrent Versions System (CVS) don’t create snapshots of the files but store file deltas. [15:41:50] yes sayan [15:41:54] I have github account and I am an active contributor in it [15:43:00] SRvSaha, great [15:45:11] a little problem: any user name i type, it says its already registered! [15:45:43] avik: Make use of _ or - [15:46:01] no special charecters! [15:46:06] SRvSaha, tried [15:46:35] What's your name avik? [15:46:38] avik i also faced the same problem and used - [15:46:55] I had a username of harsh99v [15:47:07] I changed mine to vharsh later :p [15:47:28] Roll Call: Anushil Kumar [15:47:49] You can change your username anytime, don't worry. [15:48:08] okay done [15:48:42] sorry for keeping all waiting! :( [15:48:58] avik, its ok. [15:49:11] avik: Try a mixture of Uppercase, lowercase and - or _ and number [15:49:30] SRvSaha, done thank you [15:49:39] avik: registered? [15:49:53] yes sayan [15:49:59] yes [15:50:16] Now everybody head over to this url https://github.com/new [15:50:24] this is the page to create a new repo [15:50:34] avik, Choose any username, you can change it later. [15:50:38] ! [15:50:40] next [15:50:43] next [15:50:46] Did using remote reference we cannot update our repo again [15:50:57] sayan: : link : https://git-scm.com/book/en/v2/Git-Internals-Git-References#Remotes [15:51:03] avik, How about __avik__ [15:51:25] ! [15:51:25] sandy_: you can [15:51:35] sayan: ok [15:51:48] vharsh, used> 'IamTechnotron' [15:51:51] :) [15:52:04] sayan: but on given link it say this [15:52:20] avik, Cool, try shortening it sometime later. [15:52:23] * sayan reads [15:52:24] sayan: Can I create a remote repo directly from the terminal ? [15:52:35] SRvSaha, Yes [15:52:46] You need to add the remote manually then. [15:52:52] vharsh: How? [15:53:08] SRvSaha: git remote add origin [15:53:09] Same question! [15:53:14] Read GIT-REMOTE(1) [15:53:25] SRvSaha: in github? [15:53:39] mbtamuli12: That is the case when we have the repo in github [15:53:46] sayan : Yes [15:53:49] sayan yes in github [15:54:10] SRvSaha, http://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-opening-br [15:54:15] sayan: As we generally go to github.com and create repo [15:54:20] SRvSaha, It is easier to create a repo in Github and then clone it to your machine, to begin with. [15:54:25] I don't know if you can but github has a client https://github.com/github/hub [15:54:30] and then we set remote to that repo [15:54:45] sandy_: so bascically if you checkout to that particular remote ref you can't [15:54:54] ok [15:55:06] ! [15:55:08] but you can change back to normal branch then you can [15:55:16] vharsh: So, it is. Just I was curious to know if we can do that even. [15:55:26] ! [15:55:32] let's take the question a bit later [15:55:45] Let's name the repo foobar [15:56:00] sayan: thanks :) [15:56:02] All of us naming it "foobar" ? [15:56:08] yes [15:56:45] Keep the repository name as foobar and click on the create repository button [15:57:02] ! [15:57:10] this will create a repo for you and redirect you to /foobar [15:57:12] next [15:57:14] next [15:57:16] next [15:57:18] next [15:57:26] I asked mine. Thanks [15:57:28] Any description? [15:57:34] rahuldecoded: as you like :) [15:57:36] so what exactly are we suppose to do after creating sayan's link? [15:57:51] rahuldecoded: Description is just an optional thing. It's upto you [15:58:06] avik, Clone it to your pc [15:58:07] avik: just gave the instructions https://github.com/new [15:58:34] foobar done,sorry [15:58:35] everybody done? [15:58:39] yes [15:58:41] yes [15:58:41] yes] [15:58:43] yes [15:58:44] an earlier question [15:58:46] avik: Give name to the repository as "FooBar" and press create repository [15:58:47] yes [15:58:56] yes done [15:59:01] ! [15:59:02] yes [15:59:08] yes [15:59:15] next under the quick setup you see something like this [15:59:16] https://github.com/sayanchowdhury/foobar.git [15:59:24] yes [15:59:35] yes [15:59:36] done [15:59:49] copy that url and in termial type git clone https://github.com/sayanchowdhury/foobar.git [16:00:18] remember replace sayanchowdhury with your username :) [16:00:20] next [16:00:26] what is the difference between git reference and git tag ? [16:00:34] done [16:00:44] done [16:00:44] ! [16:01:02] ! [16:01:16] madhurii, did you ask your question to google.com ? [16:01:19] i understood both reference and tag are used to make git commit easily accessible. [16:01:42] but what is the difference in these two ?? [16:01:58] madhurii: so reference means you are referencing something [16:02:08] be it commit, tag etc [16:02:09] sayan: Suppose I have added a file to my local repo and the did a wrong commit there. Not it's says everything is ready to push. How to I change the commit if I want ? [16:02:30] SRvSaha: use ! [16:02:38] okay sayan [16:02:41] Sorry sayan [16:03:13] madhurii: so tag reference will give you reference for a tag i.e the SHA [16:03:34] next [16:03:45] everybody are done with cloning? [16:03:49] yes [16:03:50] Should I use the git link below HTTPS or SSH [16:03:50] Done [16:03:52] yes [16:03:53] Yes [16:03:56] Yes! [16:03:58] oh.. i understood now thaks syan [16:03:59] Alak: use Https [16:03:59] yes [16:04:01] yes [16:04:03] HTTPS [16:04:08] Thank you. [16:04:14] yes [16:04:18] next [16:04:31] yes [16:04:41] SRvSaha: let's do the same in todays class [16:04:54] ok sayan [16:05:02] now everybody go into the directory foobar [16:05:04] sayan... can we stop QA as your instructions for git and QA are getting messed up [16:05:13] pabitra: right [16:05:16] sayan : I faced the problem while pushing today in my repo [16:05:38] pabitra: but the thing is people might get doubts in each step [16:05:56] once you move into the git directory create a file [16:06:09] name the file helloworld.txt [16:06:18] yes... those can be asked [16:06:27] you can use the command `touch helloworld.txt` [16:06:38] to create the file [16:07:32] once the file is created type `git status` [16:07:50] and you will see the file in Untracked file section, right? [16:07:58] Yes [16:08:06] yeah [16:08:07] Yes [16:08:09] Yes [16:08:11] yes [16:08:15] yes [16:08:18] ! [16:08:20] so this file is right now not getting tracked by git [16:08:45] If you type `git diff` you will see there is no diff [16:09:08] now to add the file type `git add helloworld.txt` [16:10:12] once done, if you do `git status` again you will see that the file has moved to `staging area` or `changes to be committed` [16:10:50] now open the file helloworld.txt and add the text "Hello World" [16:11:07] How is the foobar directory already git initialized? [16:11:24] We didn't use the command git init? [16:11:32] moizsajid, You just cloned it from github. THey did it for you. [16:11:40] moizsajid: please wait, I will take question all at once [16:11:55] you can add the text using `echo "Hello World" > helloworld.txt` [16:12:09] tell when done [16:12:13] done [16:12:16] done [16:12:17] done [16:12:18] done [16:12:19] done [16:12:22] done [16:12:22] done [16:12:23] done [16:12:27] done [16:12:33] done [16:12:35] done [16:12:39] Done [16:12:39] done [16:12:51] done [16:12:53] done [16:13:06] done [16:13:13] done [16:13:14] now if you do git status [16:13:27] Done [16:13:28] git status [16:13:42] you will see the same file in `staging area` as well as `modified section` [16:14:13] this is because the change you did by adding "Hello World" is yet to be added to staging [16:14:50] to the check the diff of modiefied section do `git diff` [16:15:00] and for staging are `git diff --staged` [16:15:20] ask if you have questions till now [16:15:21] next [16:16:30] ! [16:16:39] next [16:16:54] ! [16:16:55] What is --- a/helloworld.txt [16:17:10] +++ b/helloworld.txt [16:17:30] @@ -0,0 +1 @@ [16:18:07] anushil05: That is indicating the difference. --- is the deleted stuffs and +++ the added. +1 is the line added [16:18:31] anushil05: version of the same file + denotes adding, - denotes removed [16:18:40] and the numbers says 1 line was added [16:18:55] any more questions? [16:19:00] sayan: now in this case new file will be saved if we commit or it will not be saved [16:19:11] as it is in modified stage [16:19:12] anushil05: -0,0 means 0 subtraction and file was of 0 lines and +1 means One line is added [16:19:38] sandy_: use ! [16:19:42] ok [16:19:50] sandy_: no it will not be saved [16:20:06] to save it we need to go git add [16:20:13] pabitra: right [16:20:15] sandy_, [16:20:27] now to add the changes do git add helloworld.txt [16:20:36] what is a and b in that [16:21:09] anushil05: maybe take help of larry's site? [16:21:17] next [16:21:23] next [16:21:47] now that you have added the changes to the staging section [16:22:10] ! [16:22:17] check the difference between the output of git diff and git diff --staged [16:22:29] next [16:22:31] ! [16:22:34] sayan, git diff --staged doesnot shows detailed like git diff [16:22:35] next [16:23:03] pabitra: yes, because there is no change [16:23:10] ! [16:23:14] pabitra: it's a empty file [16:23:17] next [16:23:39] but we added hellow wolrd to it [16:23:42] sayan : what is this --- /dev/null when we do git diff --staged. Does it mean that from nothing(null) this is now changed to the file? [16:23:52] git diff --staged is showing ---/dev/null ??? [16:23:53] as it is shown in git diff [16:24:18] pabitra, after adding a line to https://github.com/codegeek96/foobar, add that file to staging area again and then it will show the detailed diff [16:24:25] +++ b/helloworld.txt [16:24:32] ok [16:24:37] got it sayan [16:24:44] s/ https://github.com/codegeek96/foobar/ helloworld.txt [16:24:57] thanks sayan code_geek ... I got the difference [16:25:19] /dev/null means nothing [16:25:36] ok. My intuition was correct [16:25:43] next [16:25:50] Okay moving ahead [16:26:12] to commit the changes `git commit -m "Add helloworld.txt"` [16:26:56] ! [16:27:12] Once the commit is done you can check the log using `git log` [16:27:28] next [16:27:38] Had the file not been empty at first, i.e created with some text earlier, would we still get /dev/null ? [16:27:45] vharsh: no [16:27:54] [16:27:58] ! [16:28:09] vharsh: I mean if there is something in the staging diff then no, else yes [16:28:14] next [16:28:18] what this mean create mode 100644 helloworld.txt [16:28:27] sandy_: google? [16:28:35] sayan: ok [16:28:45] .link question [16:29:11] seems like this link needs a re-read [16:29:19] sayan: sorry for that [16:29:43] everybody remembers file permissions? [16:29:50] ! [16:29:55] yes [16:30:03] ! [16:30:04] ! [16:30:04] yes [16:30:06] Yes [16:30:10] yes [16:30:15] Yes [16:31:01] yes [16:31:09] yes [16:31:34] i guess git has a different file mode system. Here's what I found. stackoverflow.com/questions/19620335/what-is-gits-filemode [16:31:39] slow internet nick freezed :( [16:32:09] yudocaa, sayan is that you? [16:32:17] sandy_: http://stackoverflow.com/questions/14127501/how-to-interprit-git-create-mode-message [16:32:42] sayan: thanks :) [16:33:11] add:yudocaa [16:33:25] masters [16:33:47] oh sad [16:33:52] next [16:33:54] next [16:33:57] sayan, But mbuf isn't online now. [16:34:01] solved [16:34:10] I got my answer. [16:34:14] cool [16:34:18] next [16:34:21] next [16:34:30] There are 2 commit:1. Add helloworld.txt 2.Initial commit but I commit only once [16:34:59] anushil05: you must have checked the Create README.md file thing [16:35:08] while creating the repo in Github [16:35:18] Oh yes sayan [16:35:33] So that is also a commit then [16:35:54] anushil05: yes, you will have a file called README.md [16:36:03] that is added by Github for you [16:36:12] Thanks [16:36:47] now do this `cat .git/config` [16:37:56] you will see something like this http://paste.fedoraproject.org/389895/82478531/ [16:38:12] this is a configuration file [16:38:56] now under [remote "origin"] you will see there is the url [16:39:07] the url which you used to clone [16:40:00] when you type `git push origin master` in your terminal to push the changes you did to remote [16:40:18] sayan https://github.com/username/repo [16:40:51] git breaks git as `git push ` [16:41:04] ! [16:41:50] so for us the remote name is `origin`, so git checks the url for `origin` in the config and updates the branch `master` [16:41:55] as the branch here is master [16:42:12] next [16:42:46] sayan... till the time we dont do "git push origin master" it is in our local repo?? not pusjed to github ?? [16:42:52] pabitra: yes [16:43:02] pabitra: one question mark [16:43:08] sayan, your explanation is as clear as crystal. [16:43:14] no need to use two [16:44:04] next [16:44:06] rahulbajaj: :) [16:44:15] sorry sayan [16:44:21] Now everybody do `git push origin master` [16:44:28] done [16:44:33] Doen [16:44:38] it will ask for you github username/password [16:44:41] s/den/done [16:44:47] s/you/your [16:45:47] done [16:45:50] done [16:46:19] not asking me username [16:46:47] sayan Authentication failed ! Username and password is correct [16:46:57] casper is now known as Guest73693 [16:47:00] pabitra, did you use ssh cloning? [16:47:06] iKshitij: can't be [16:47:07] pabitra, what does 'git push' return ? [16:47:50] Sorry, I was disconnected for a minute or two [16:47:57] pabitra: hmm, fpaste the output of git remote -v [16:48:00] I have pushed the changes, now what? [16:48:11] sayan, it did [16:48:20] vharsh_, cool. No you can see your changes on github [16:48:29] but along with some wallet like pop-up asking password [16:48:47] vharsh_: nothing :) [16:48:48] abhishekg5_, Thanks. Dammn college wifi :/ [16:48:55] sayan, :) thanks [16:49:02] vharsh_ i knw the pain [16:49:06] pabitra, you'll have to put your github password there. [16:49:15] pabitra, that is how gnome is configured [16:49:23] Richard15: knw? [16:49:26] ok... I did [16:49:41] i meant know [16:49:50] now you can see you changes in Github :) [16:50:03] thanks sayan abhishekg5_ fhackdroid rahulbajaj [16:50:07] pabitra, only one full stop is enough. :) [16:50:14] * fhackdroid congratulates everyone on the first push :) [16:50:30] * vharsh_ wohoo :) [16:50:38] * Richard15 hi5 !! [16:50:50] * mbtamuli12 says not the first push for him [16:50:58] Well DOne all :D [16:51:05] pabitra, avoid SMS language is prohibited :) [16:51:06] Class is still not over [16:51:28] sorry fhackdroid... [16:51:52] pabitra, "..." are not required :) [16:52:08] fhackdroid, "avoid SMS language is prohibited :)"? [16:52:18] i know but adat se majboor. :P [16:52:20] avik, my bad :) [16:52:32] ! [16:52:36] fhackdroid, np :) [16:52:41] Everybody please stop talking or will be kicked [16:52:46] vharsh_ is now known as vharsh [16:53:13] pabitra: follow the irc ettiquetes [16:53:17] HoloIRCUser1 is now known as Anupama_ [16:53:20] next [16:53:21] sayan, can I clone from github and push the entire repo to bitbucket? [16:53:23] sorry sayan [16:53:29] PrashantJ: yes [16:53:40] PrashantJ: that's what I will be telling next [16:53:49] sayan, okay thanks:) [16:54:26] In open source projects you have a main repo [16:54:28] sayan, No need of special permissions? I mean, the repo must exist beforehand. [16:55:11] vharsh: I never told the answer [16:55:24] sayan, sorry [16:55:47] In open source projects you have a main repo, from which you fork the repo because you will not have the rights to push to the main repo [16:56:16] forking creating a repo for you in which you can push pull [16:56:47] for example we have a repo fedora-infra/fedmsg which is a amazing project [16:57:14] Now if you want to contribute you can directly clone the repo to you local system but cannot push any changes [16:57:23] because you don't have the access [16:57:33] For that you clone the project [16:57:40] s/clone/fork [16:58:00] Forking the project will create a repo for you like sayanchowdhury/fedmsg [16:58:14] https://github.com/sayanchowdhury/fedmsg [16:58:17] Here is the link [16:58:48] You can see in this link that the under sayanchowdhury/fedmsg, it's written forked from fedora-infra/fedmsg [16:59:11] Now you can clone this sayanchowdhury/fedmsg and work on this repo [16:59:17] Questions? [16:59:33] ! [16:59:57] next [17:00:04] Do we need explicit permissions to fork? [17:00:10] vharsh: no [17:00:10] ok cleared. [17:00:12] ! [17:00:12] ! [17:00:15] ! [17:00:23] next [17:00:34] sayan, I didn't get about file permisssions while commiting [17:00:34] next [17:00:38] sayan, When can you push your changes in main repo? [17:00:42] as I was not asked [17:00:49] pabitra: after the session [17:01:12] PrashantJ: you cannot push until you have the permission [17:01:13] in which case we will be asked for thses file permission [17:01:15] ? [17:01:33] pabitra: did not get you [17:01:35] next [17:01:52] So fork and clone does the same thing [17:01:54] PrashantJ, you'll have to open a PR, then only the maintainers of the main repo can merge your commits [17:02:10] anushil05: no [17:02:26] I am sorry. I have got to go now. Exams are heading. [17:02:35] abhishekg5_, sayan Thanks. Will explore PR. [17:02:37] anushil05, in clone you can push the changes tovthe original repository but in fork you can't [17:02:46] thanks Sayan for the session [17:02:50] s/tovthe/ to the [17:02:57] Yeah I mean that [17:03:06] anushil05, no. Fork makes a clone of main repo into your profile. Cloning is basically copying repo from server to your local machine [17:03:08] anushil05: clone pulls the repo from the remote and forks create a copy in the remote server [17:03:17] next [17:03:37] now back to the foobar repo [17:05:13] Now suppose my repo is the main repo - https://github.com/sayanchowdhury/foobar [17:05:36] so you add a new remote that would point to this main repo [17:05:56] Use `git remote add upstream https://github.com/sayanchowdhury/foobar.git` [17:06:08] Here upstream is the remote name [17:06:48] Check the output of `cat .git/config` again. you will see a entry for upstream with the url pointing to mine [17:07:33] ! [17:07:37] Now pull the changes type `git pull upstream master` [17:08:02] this will tell git to pull the changes from upstream (https://github.com/sayanchowdhury/foobar) [17:08:03] next [17:08:15] sayan: can we name remote anything else? [17:08:24] sandy_: yes [17:08:33] sandy_: you can give your name too :) [17:08:43] sayan: ok [17:08:45] ! [17:09:00] sandy_: but then you need to reference using that name git pull sandy_ master [17:09:02] ! [17:09:06] next [17:09:09] next [17:09:10] ! [17:09:13] WHy does this come in between two remote declarations ? [17:09:15] [branch "master"] [17:09:21] sayan: ok i understand :) [17:09:27] sayan: thanks :) [17:09:29] It shows a fatal error [17:09:35] I am looking in the file cat .git/config [17:09:35] [17:09:36] refusing to merge unrelated histories [17:09:54] vharsh: new entries are added to the end, order does not mater [17:10:00] s/mater/matter [17:10:01] next [17:10:07] What is the use of making different remotes? [17:10:34] Alak: that is because you must has not followed what we told [17:10:53] I'll check, thanks [17:10:59] Alak: fpaste git log [17:11:22] SRvSaha: to work with different repos of different people [17:11:37] SRvSaha: or to check changes they are doing [17:11:40] next [17:11:58] https://paste.fedoraproject.org/389905/ [17:12:22] Alak: just one commit? [17:12:42] sayan: That means we can pull using other's remote and branch to see what they are up to ? [17:12:44] Ah! my mistake a terrible one :( [17:13:14] ! [17:13:17] I guess I missed something. I'll scroll up [17:13:41] ! [17:13:47] sayan, did you forget to create the branch? [17:14:29] rahulbajaj: no the thing is all the repos are diffent [17:14:37] sayan, But things are fine here. [17:14:54] vharsh: can fpaste your git log [17:15:19] ! [17:15:44] sayan, what mistake are you talking about ? [17:15:51] next [17:15:54] next [17:15:55] next [17:15:57] sayan: I am getting error Merge Conflict link: http://paste.fedoraproject.org/389908/68249972/ [17:15:57] May I paste my log? Pretty similar. [17:15:57] next [17:15:59] sayan, https://paste.fedoraproject.org/389910/50153146/ [17:16:02] query solved [17:16:49] smdeep: yes, I did the mistake [17:16:53] http://paste.fedoraproject.org/389909/25008314/ [17:17:14] sayan, I can see that you added a line "Hello Mars, I am coming :)" [17:17:49] I think everybody has a merge conflict now because of my mistake :( [17:18:07] What was the mistake, sayan? [17:18:19] sayan, its okay, the basic concept is clear i guess. [17:18:34] We can remove the heretext markers and commit :) [17:18:52] Let me explain the mistake, that would actually clear up things [17:19:02] sayan, Is there something else? [17:19:05] So the commit history is different [17:20:03] For everybody the first commit is different, so when you pull mine git tries to merge it [17:20:19] but cannot because there is no common commit, got it? [17:20:33] yeah. [17:20:34] sayan, Git didn't try to merge in my case? [17:20:40] sayan: yes [17:21:02] vharsh: you git log is not proper because it does not show my commit [17:21:04] ! [17:21:06] next [17:21:12] s/?/. [17:21:31] if in this case we are trying to pull the same file from two repos [17:21:31] ! [17:21:34] ! [17:21:45] ! [17:21:46] it is showing error as no common commits [17:21:47] sayan, But I can see the added message "Mars" ,etc [17:22:00] so is it mandatory to have a common commit [17:22:01] ? [17:22:02] next [17:22:04] next [17:22:04] why is the first commit different for everyone? [17:22:06] next [17:22:08] sayan: So what command should we use instead of this git pull ? [17:22:11] would anyone mind to have a look: http://paste.fedoraproject.org/389912? [17:22:41] smdeep: the text for everybody's is same :) [17:22:53] smdeep: but the author is different, the SHA is different [17:22:56] sayan, My helloworld.txt file http://paste.fedoraproject.org/389913/50530146/ [17:22:58] avik, upsteam typo [17:23:01] avik:tyo in upstream [17:23:10] ok [17:23:22] vharsh, Checkout if you have 'rebase = true' in your .git/config. Maybe it is the reason you don't have merge conflicts. [17:23:48] smdeep: the SHA is calculated using content, author, time, ... [17:23:58] avik: you named it upsteam and you are typing git pull upstream [17:24:08] LambaInsaan, I have prune set to true under [fetch] [17:24:11] smdeep: so even though the content of first commit is different, the commit is not the same :) [17:24:20] ok [17:24:25] LambaInsaan, I had this config from the Github Webinar. [17:24:30] sayan, the author will be different in each case, whenever we will try to merge. so will this show such error everytime ? [17:25:01] pabitra: no, it will not be [17:25:10] avik: typo while adding remote :) [17:25:16] Okay let's fix this [17:25:24] really quick [17:25:45] Nope, .git/config also has no rebase=true [17:25:56] LambaInsaan, I also didn't get any merge conflict and yes, in .git/config rebase = true [17:26:00] come out of the git directory using cd .. [17:26:34] Fork this repo https://github.com/sayanchowdhury/foobar [17:26:49] you will find a Fork button on top right corner :) [17:26:50] code_geek: Which url did you use in the remote upstream you created? [17:26:50] sayan, using github? [17:27:07] vharsh: fork is done using Github only [17:27:41] This will create new repo for you [17:27:48] SRvSaha, https://github.com/sayanchowdhury/foobar.git [17:28:14] sayan: it created foobar-1 [17:28:21] smdeep: cool :) [17:28:28] code_geek: Use url of sayan's foobar repo [17:28:28] We already have a repo named foobar, so it creates foobar-1 [17:28:35] yes code_geek but it should have given error [17:28:36] Right. [17:28:37] everybody will have a similar url foobar-1 [17:28:53] now clone that repo [17:28:55] SRvSaha, okay I'll try it again [17:29:02] Ok [17:29:13] git clone https://github.com//foobar.git/ [17:29:56] done [17:30:00] done [17:30:04] done [17:30:48] sayan, i guess it would be foobar-1.git [17:30:58] pabitra, yes. [17:31:38] pabitra: correct :) I did mine [17:31:52] Now let's add remote again [17:32:06] i am always seeing kdewallet [17:32:08] :( [17:32:24] You know the steps right ? git remote add upstream https://github.com/sayanchowdhury/foobar.git [17:32:29] ! [17:32:38] pabitra: while cloning also? [17:32:39] it will be foobar.git and not foobar-1.git [17:32:43] yes [17:32:46] smdeep: yes [17:32:50] error code 9 [17:33:38] smdeep: for adding the remote it will be the exact command I told [17:33:43] git remote add upstream https://github.com/sayanchowdhury/foobar.git [17:33:44] sayan: Are we to create the remote inside foobar-1 [17:33:44] next [17:33:50] SRvSaha: yes [17:33:58] pabitra, Eh? While cloning too, seriously? [17:34:04] yes [17:34:05] pabitra: fpaste the log [17:34:16] its a pop-up [17:34:16] pabitra: let's see what you did [17:34:21] how will i paste log [17:34:50] git log | fpaste # should do? [17:34:54] pabitra: copy and paste it in paste.fedoraproject.org [17:35:06] vharsh: that needs fpaste to be installed [17:35:58] everybody done? [17:36:03] yes [17:36:04] yes [17:36:20] rest? [17:36:21] yes [17:36:21] ! [17:36:23] ! [17:36:24] yes [17:36:26] Yes. [17:36:26] yes [17:36:26] next [17:36:29] next [17:36:36] done [17:36:47] https://paste.fedoraproject.org/389920/51371146/ [17:36:53] i m getting this [17:37:10] Anupama: ah no [17:37:27] Anupama: did you fork? the repo? [17:37:37] Like what we did now, say we have not forked the repo and I am having a remote to your repo of same name, when will it give merging conflict> I but the files with the same name have different content? [17:37:37] yeah i did [17:37:49] Anupama you have cloned Sayan's repo I guess. [17:37:53] Anupama: once you have forked and cloned you need to do `cd foobar-1` [17:38:38] SRvSaha: after you for you will have the content of my repo :) [17:38:40] Anupama, you are in the previous repo. [17:39:22] SRvSaha: because you are having a clone of my repo [17:39:27] https://paste.fedoraproject.org/389923/82515491/ [17:39:52] Anupama: did you clone the repo you forked? [17:40:16] Anupama: what is your github username? [17:40:18] sayan: Did not get it :( [17:40:41] SRvSaha: you told you did not fork the repo rather have the repo of mine right? [17:40:53] https://paste.fedoraproject.org/389925/14682516/ [17:41:08] yeah i have forked and cloned [17:41:15] it is Anupama0013 [17:41:29] sayan: Is merging conflict just because of files of same name have different content and when they are merged git gets confused? [17:41:30] sayan, https://snag.gy/BX6lUv.jpg [17:41:51] SRvSaha, You get merge conflicts when you try to merge two branches(or same branches across different origins/sources) with different file contents. [17:41:52] sayan: yes. Just I am using a remote to your repo [17:42:06] whoIs sayan [17:42:14] oops sorry [17:42:37] Anupama: can you just do cd foobar-1 ? [17:42:40] it is `/WHOIS` vibhcool [17:43:03] Anupama: do cd foobar.git [17:43:07] sayan: still same [17:43:16] hah, i missed that '/' [17:43:31] Anupama, Do a "pwd" [17:44:03] Anupama: `cd foobar.git` also gives error? [17:44:34] https://paste.fedoraproject.org/389927/14682518/ [17:45:23] Anupama: `cd && cd foobar-1.git` [17:45:44] sayan: I think it'll be cd foobar rather than cd foobar.git [17:45:51] Anupama, do: cd foobar or cd foobar-1 [17:45:53] Anupama : come out of foobar [17:46:21] Anupama, : do cd first [17:46:22] Yeah, do a cd .. to come to /home/onu/ [17:46:30] got it... [17:46:36] Anupama: worked ? [17:46:38] :) [17:46:44] yeah worked [17:46:46] cool \o/ [17:46:58] I forgot where I was :) [17:47:01] at last :) [17:47:06] Anupama: you need to add the remote [17:47:11] We added remote upstream [17:47:15] git remote add upstream https://github.com/sayanchowdhury/foobar.git [17:47:18] git remote add upstream https://github.com/sayanchowdhury/foobar.git [17:47:27] u were here sayan [17:47:35] you were here sayan [17:48:26] Anupama: you added the remote :) [17:49:00] sayan: yes [17:49:05] pabitra: I am cluless about you :( [17:49:26] now pull the changes from upstream [17:49:28] so I got it sayan [17:49:36] git pull --rebase upstream master [17:49:37] what is wallet i dont know [17:49:58] That will pull some new changes :) [17:50:26] sayan, i missed all those after clone [17:50:36] sayan, pm [17:50:36] can you please repeat ? [17:50:38] please [17:50:50] can somebody tell pabitra the steps in pm? [17:50:58] sayan: [17:51:12] done no errors [17:51:46] sayan, Have any instant battery saving tips ? 7% and counting? I am in a park, using a different wifi. I don't want to loose out? I have shut firefox a few minutes ago. [17:52:22] vharsh: nope :( [17:52:27] cool :) [17:52:29] everybody done [17:52:34] done :) [17:52:36] vharsh same here ! 6% [17:52:36] vharsh: almost done :) [17:52:37] sayan: yes [17:52:50] Yes. [17:52:54] yes [17:53:04] Now add something to the helloworld.txt file, commit it and push it :) [17:53:09] Ok [17:53:11] ! [17:53:29] ! [17:53:29] pabitra, PM. [17:53:32] now when you try to push using `git push upstream master` [17:53:58] this will give you an error as it points to my repo and you don't have access [17:54:19] so you need to do `git push origin master` --> that will push to you repo :) [17:54:33] tell me when done, try pushing to both remote :) [17:55:00] Done. [17:55:28] git push origin master # works [17:55:32] Done. [17:55:43] smdeep: tried git push upstream master? [17:55:50] done [17:55:55] sayan: that gave permission denied [17:55:57] DONE [17:56:20] smdeep: cool :) you know the reason why :) [17:56:26] Done [17:56:32] Done [17:56:32] Yes :) [17:56:34] Everything up-to-date [17:56:42] oops. [17:56:42] done. [17:56:49] I'll fix it [17:56:49] sk_ is now known as ksaikiranr [17:56:59] Yes permission denied it is [17:57:00] done [17:57:10] done [17:57:25] Done [17:57:37] done [17:57:38] SRvSaha, You gave a wong password. [17:57:39] Next go to your github repo the `foobar-1` one [17:57:51] s/wong/wrong [17:58:09] And search for Pull request :) [17:58:25] Click on the pull request button [17:58:25] vharsh: I can push I my repo not in the cloned repo. So, it's a permission denied [17:58:53] You must have given a wring password to your GIthub Account [17:59:00] It will ask for PR title and description, fill it with something you want [17:59:23] and click on the create Pull Request button at the bottom of the page [17:59:33] sayan: Sorry, but I have to leave, I'll send the Pull Request later. [17:59:36] ^^ I guess it's in the bottom of the page [17:59:44] mbtamuli12: no issues, this is the last thing :) [18:00:34] * sayan waits for the PRs [18:00:35] Sayan I have a New Pull Request button [18:00:57] sayan: Should I click that? [18:01:02] smdeep: Yes [18:01:08] sayan: thanks. [18:01:17] Battery dead ! :( [18:01:25] ! [18:01:29] next [18:01:31] Done, identical. [18:01:32] next [18:01:44] i tried git push origin master [18:01:46] it worked [18:01:54] Showing there isn't anything to compare [18:01:54] so what else remote i should push it [18:02:34] anushil05: fpaste `git log` [18:03:18] pabitra: the other remote I told was mine, but it would give permission denied as you don't have access [18:03:45] do you mean upstream commad [18:03:52] pabitra: yes [18:04:16] sayan: pull request created [18:04:33] Can see only 4 PR here - https://github.com/sayanchowdhury/foobar/pulls [18:05:08] ! [18:05:13] next [18:05:23] what is the working of this pull request? [18:05:25] next [18:05:38] pabitra: you mean the use? [18:06:02] yues [18:06:04] yes [18:06:13] One you create the pull request the maintainer of the project can merge your changes to the project after a review [18:06:22] https://paste.fedoraproject.org/389938/25304514/ [18:06:37] so is it like a merge ?? [18:06:46] sorry again for double '?' [18:06:56] pabitra: :) I was going to point for that [18:07:13] pabitra: yes, merge [18:07:30] sayan https://paste.fedoraproject.org/389938/25304514/ [18:07:31] anushil05: you need to do a commit, right now the log has only my changes [18:08:07] smdeep: did not see your PR ? [18:08:42] so once the PR is reviewed then it can be merged ? [18:09:07] pabitra: yes [18:09:13] next [18:09:21] Any questions? [18:09:24] ! [18:09:34] Shall we end? [18:09:35] next [18:09:37] then who does this merging? github or [18:09:44] sent PR [18:09:45] the owner/maintainer [18:09:47] pabitra: the maintainer of the project [18:10:02] I did but still same [18:10:03] SRvSaha: yes saw :) [18:10:10] anushil05: repo url? [18:10:14] so i as a user who sent the PR have nothing to do after review [18:10:15] ? [18:10:33] pabitra: yes, send more PRs [18:10:38] ! [18:10:40] next [18:10:40] hydro69/foobar-1/pulls [18:10:44] I already sent [18:11:06] pabitra: I mean that's the task after sending a PR for review [18:11:40] anushil05: did you push? Only my commits here -https://github.com/hydro69/foobar-1/commits/master [18:11:48] sayan could you show us on terminal how when you fork a project and make changes to the project and commit it to your repo [18:11:53] ok, so you mean we need to send more PRs [18:12:04] how do these changes go to the main repo [18:12:06] ! [18:12:14] sk_ is now known as ksaikiranr [18:12:21] akshays: check the logs just told pabitra [18:12:30] pabitra: after the session [18:12:39] sayan nothings happening [18:12:42] :( [18:12:53] avik: while trying to create PR? [18:13:00] avik: Github URL? [18:13:24] yes, can not create PR [18:13:28] I pushed [18:13:39] Now it showing what I added [18:13:43] anushil05: cool :) [18:14:24] So pull request will show me the changes in your file and mine [18:14:25] avik: github URL? [18:14:30] anushil05: yes [18:14:30] sayan [18:14:31] I had a slow connection, was taking forever to git push. Now done :) [18:14:38] code_geek: cool :) [18:14:45] https://github.com/sayanchowdhury/foobar/compare/master@%7B1day%7D...master [18:14:49] sayan^^ [18:14:55] got it sayan thanks :) [18:15:12] can somebody explain avik? [18:15:17] One more thing after commit I will push? [18:15:34] Roll Call [18:15:42] Pabitra Pati [18:15:44] Jogender Kota [18:15:52] Shantanu Acharya [18:15:55] Varsha R [18:15:57] sandeep choudhary [18:15:57] Vaibhav jain [18:15:59] Anupama Mandal [18:16:00] Madhuri Muley [18:16:03] Mayank Gupta [18:16:06] Akshay Shipurkar [18:16:07] Yashwanth M [18:16:08] Avik Mukherjee sayan none:( [18:16:32] Priyanka Sharma [18:16:33] Deepanshu Kapoor [18:17:01] endclass [18:17:01] [## Class Ended at Mon Jul 11 18:17:01 2016 ##]