I've watched about 3 videos on Git and honestly your tutorials are the only one where I understood it. You explain everything so clearly and at a great pace. I'm so glad I found your channel.
@RaghavPal7 жыл бұрын
I am glad you found it useful. Keep Learning !
@shashanksharma94757 жыл бұрын
True @westfield90
@jeremylam97224 жыл бұрын
i really love how you add a little bit of repetition to your videos to make us use what we learnt. It also allows us to understand exactly whats going through in your head. good job well done keep up the good work.
@RaghavPal4 жыл бұрын
You are so welcome Jeremy
@sammy-zo6sl5 жыл бұрын
I liked how you explained everything step-by-step and in a concise manner.
@RaghavPal5 жыл бұрын
Thanks for watching Sammy
@aditimenon2767 Жыл бұрын
Your entire channel is very informative and precise. Much much regards to you Sir.
@RaghavPal Жыл бұрын
So happy & humbled to hear that Aditi. Thanks
@rohithdasi4 жыл бұрын
Raghav i had see more then 4 git videos from diffrent persons , but i understand now , thank you..
@RaghavPal4 жыл бұрын
So happy & humbled to know this Rohith
@andresyesidmorenovilla78889 ай бұрын
Excellent tutorial, complete yet succinct and straight to the point. Thank you so much
@RaghavPal9 ай бұрын
Most welcome Andres
@UmeshKumar-ox3zp6 жыл бұрын
Simplest and best git tutorials for beginners. Good job, Raghav!! Keep posting. Thank you.
@RaghavPal6 жыл бұрын
You're welcome Umesh
@vishalpathak85245 жыл бұрын
Hi Raghav, Thanks for Tutorial. You explain in very simple way I understand all git commands properly.
@RaghavPal5 жыл бұрын
Happy to know that Vishal
@MalluManish Жыл бұрын
Manish...Thanks for Your hard work and uploading the stuffs for the Community, Really excellent and extraordinary explanation . Thank you Again..Now I can add my framework to git repository...Thank you sir............................
@RaghavPal Жыл бұрын
Most welcome. all the best Manish
@jaminDNB Жыл бұрын
Your educational content, Raghav, is top-notch! 🚀 Clear explanations and well-chosen examples make learning a breeze. Thanks for expanding my knowledge. Keep the outstanding work coming! 🌟💻📚
@RaghavPal Жыл бұрын
Thanks a ton
@ramroy59422 жыл бұрын
I am really a big fan of your style.Thank you uploading the videos
@RaghavPal2 жыл бұрын
Most welcome
@srinivaspklpkl4 жыл бұрын
I have watched so many videos for this, but i got from your video thank you so much
@RaghavPal4 жыл бұрын
So happy to know this Srinivas
@adityapatel58434 жыл бұрын
Clear and to the point. Great video to get started with Git Branching!
@RaghavPal4 жыл бұрын
Thanks Aditya
@kirank56538 жыл бұрын
Hello Raghav, Thank you for nicely tailored Git, web services and Jenkins tutorials....
@RaghavPal8 жыл бұрын
I am glad you found it helpful
@NipunDavid4 жыл бұрын
At 6:12 why have you used -u orign and not just git push since you are already no the MyNewBranch?
@RaghavPal4 жыл бұрын
Hi Nipun, yes, you may skip -u here
@farnaazkauser19936 жыл бұрын
please dont stop making videos.. u make concepts easy to understand
@RaghavPal6 жыл бұрын
Sure, I will continue this. Thanks Farnaaz
@srikanthbolisetty14174 жыл бұрын
Thanks, Raghav! Easy to understand.
@RaghavPal4 жыл бұрын
Most welcome Srikanth
@ankitsethia65344 жыл бұрын
Salute to your efforts. Awesome video for anyone to understand. Thanks!
@RaghavPal4 жыл бұрын
You're welcome Ankit
@VijayKumar-eq9ou5 жыл бұрын
Good job brother . Hats off to your way of simplifying the complex things and all your efforts. Thanq very much for all your efforts
@RaghavPal5 жыл бұрын
You're welcome Vijay
@PkStudio565 жыл бұрын
Very good thanks
@RaghavPal5 жыл бұрын
You're welcome
@nooreinfatima47194 жыл бұрын
It was really helpful. Thanks a lot for such great video.
@RaghavPal3 жыл бұрын
Most welcome Noorein
@anjalirawat55995 жыл бұрын
HI Raghav ,Thanks for ur videos.I have one query, like if I am making changes to my file everyday,,, eg ver1,ver 2,ver3 and then suddenly while working on ver3 i wanted to see my previous file ver1, how will i get that.Also what will happen if i keep on modifying same file without committing it.
@RaghavPal5 жыл бұрын
Hi Anjali, you can always go back to any previous commit. I believe I have explained that in some video. Every commit has a commit id. If you run command git log You can see the commits and id. You can do git checkout "commidid" Here are more links to help - stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit
@anjalirawat55995 жыл бұрын
@@RaghavPal Thanks Raghav for the reply. Yeah you explained it in "tag" video.I came across that video later ..thankyou
@harshadaborade571213 күн бұрын
Can you explain pull, push , merge conflicts
@RaghavPal13 күн бұрын
Sure Harshada, will plan a session
@sklondon58552 жыл бұрын
Hi Raghav sir can you please share the step to follow all activity in IDE instead of command prompt
@RaghavPal2 жыл бұрын
I will plan on this Shaira
@philb4462 Жыл бұрын
I have been recommended to set up a branch for each developer where I work. Is that something you consider to be good practice? It's different to your example here where you have code being written for a specific purpose and then deleting the branch when the objectives have been achieved. Our branches are permanent.
@RaghavPal Жыл бұрын
Phil Whether or not it is good practice to have a permanent branch for each developer depends on a number of factors, including the size and complexity of your project, the number of developers working on the project, and your team's workflow. *Pros of having a permanent branch for each developer:* *Improved isolation:* Each developer's code is isolated from the code of other developers, which can help to prevent conflicts and merge issues. *Increased visibility:* It is easy to see what code each developer is working on and what changes they have made. *Enhanced collaboration:* Developers can easily share code and collaborate on features by merging their branches into a shared development branch. *Cons of having a permanent branch for each developer:* *Increased complexity:* Managing a large number of permanent branches can be complex and time-consuming. *Reduced visibility of the codebase:* It can be difficult to get a holistic view of the codebase when there are many different branches. *Increased risk of merge conflicts:* Merge conflicts are more likely to occur when there are many different branches. *My recommendation:* I would recommend that you start with a temporary branch for each developer. This will give you the benefits of isolation, visibility, and collaboration, without the complexity of managing a large number of permanent branches. Once you have a good understanding of how your team works and how your project is structured, you can decide whether or not to switch to permanent branches. If you do decide to use permanent branches, I recommend that you implement some best practices to help manage them effectively. *Best practices for managing permanent branches:* *Use a branching strategy:* Define a branching strategy that outlines how branches will be used and when they will be merged into the main development branch. *Implement code reviews:* Require all code changes to be reviewed by another developer before being merged into the main development branch. *Use a merge tool:* Use a merge tool to help resolve merge conflicts. *Automate testing:* Automate testing to ensure that code changes do not break the existing functionality. Having a permanent branch for each developer can be a good practice, but it is important to weigh the pros and cons carefully before making a decision. If you do decide to use permanent branches, be sure to implement some best practices to help manage them effectively
@philb4462 Жыл бұрын
@@RaghavPal Thank you so much! 🙂🙂🙂👍👍👍
@sadathossainchowdhury6314 жыл бұрын
Excellent Explanation. Can you make video for git feature branch workflow ?
@RaghavPal4 жыл бұрын
Hi Sadat, yes will plan
@gandrabbhai52884 жыл бұрын
Hii sir can we use -b for direct create a branch and log into it and after delete branch locally we also use git push origin :branchname for dlt remote ly
@RaghavPal4 жыл бұрын
You can
@kamaboko17 жыл бұрын
Great tutorial series. Very informative.
@RaghavPal7 жыл бұрын
Thanks for watching
@RiteshKumar-dx1uz6 жыл бұрын
Very informative video.
@amarnath14948 ай бұрын
Hi Raghav , To create a new file, $ Touch (or) dir> "", which on e to use?
@RaghavPal8 ай бұрын
Amarnath To create a new file in a Linux environment, you have two options: 1. Using `touch`: - The `touch` command creates a new, empty file. - The basic syntax is: ``` touch ``` - Replace `` with the desired name for your file. - Remember that most Linux filesystems are case-sensitive, so ensure that the filename is spelled exactly as you want it. 2. Using `mkdir` (for directories): - The `mkdir` command creates a new directory (folder). - If you want to create a new file within a specific directory, you can first create the directory using `mkdir` and then create the file inside it. - The basic syntax for creating a directory is: ``` mkdir ``` - Replace `` with the desired name for your directory. - After creating the directory, you can use `touch` to create files inside it. Remember that `touch` is specifically for creating files, while `mkdir` is for creating directories. Choose the appropriate command based on your needs For example: - To create a new file named "mytext.txt": ``` touch mytext.txt ``` - To create a new directory named "mydir" and then create a file inside it: ``` mkdir mydir touch mydir/myfile.txt ``` hope it helps
@amarnath14948 ай бұрын
Thanks for the explanation and your time Raghav
@OddBallTrails5 жыл бұрын
Hello Raghav. Do you have any tutorial on merge and rebase. Please help, these both are very confusing to me.
@RaghavPal5 жыл бұрын
Hi Mukesh, I will try to do a session on this.
@OddBallTrails5 жыл бұрын
@@RaghavPal thank you :) please do for sure....this is a must know for me...thanks again.
@id14u27 жыл бұрын
great video any video for resolving conflicts using gitbash thanks
@RaghavPal7 жыл бұрын
what is the issue you are facing
@id14u27 жыл бұрын
if two users edit the same file there will a conflict and it will not merge
@shubhamagarwal25484 жыл бұрын
Thank you very much for this tutorial
@RaghavPal4 жыл бұрын
You are welcome Shubham
@udaysabbisetty95094 жыл бұрын
Awesome explanation
@RaghavPal4 жыл бұрын
Glad you liked it Uday
@pjmclenon Жыл бұрын
you are on a mac i am on a windows machine how do i create a file at the cli touch doesnt work here ok? Lisa thxz
@RaghavPal Жыл бұрын
Hi On a Windows machine, you can create a new file using the "type nul > filename" command in the Command Prompt or PowerShell. Here's an example: Open Command Prompt or PowerShell. Navigate to the directory where you want to create the file using the "cd" command. Type "type nul > filename.txt" and press Enter, replacing "filename" with the name you want to give the file and ".txt" with the extension you want to use. This will create a new empty file with the specified name and extension in the current directory ------------------------------------------ Another option is to install git bash on your windows system. using git bash command line, you will be able to run mac/linux commands To install Git Bash on Windows, you can follow these steps: Go to the Git for Windows download page: gitforwindows.org/ Click the "Download" button to download the Git for Windows installer. Run the installer and follow the prompts to install Git Bash on your system. Once the installation is complete, you can launch Git Bash by searching for "Git Bash" in the Windows Start menu. Alternatively, if you prefer to use a package manager to install Git Bash, you can use Chocolatey: Install Chocolatey by following the instructions on their website: chocolatey.org/install Open a command prompt or PowerShell window as an administrator. Type the following command and press Enter to install Git Bash: choco install git Wait for the installation to complete, and then you can launch Git Bash by searching for "Git Bash" in the Windows Start menu.
@pjmclenon Жыл бұрын
thank you i apprecite it i will try --Lisa--
@shireeshkantharaj71755 жыл бұрын
Quick Question: The code in Git does not match the actual code in production, how to over come this? what strategy should be included?
@RaghavPal5 жыл бұрын
Hi Shireesh, are they on 2 separate branches, you can merge the branches. Do watch merge and rebase video kzbin.info/www/bejne/gYiki59ohq12apY
@sharmilashaik3564 жыл бұрын
Please share me any high level process for GIT branching and tagging with flow diagram
@RaghavPal4 жыл бұрын
Hi Sharmila, sure, I will do a session
@sharmilashaik3564 жыл бұрын
hi, I am working on one RFP, need the w information.@@RaghavPal . 1.why we want to create new git branch instead of old branch 2.how we can able to handle fail safe mechanism incase of any wrong commits to the repoistory 3. How will copy the changes from master branch to new branch by using tagging/merging 4.jenkin job updated to add new git parameters These 4 points I need to present with any diagram
@RaghavPal4 жыл бұрын
Hi Sharmila, 1. We create a new branch mostly to develop a new feature. So that if anything goes wrong we can revert to the original branch 2. This is where we try to create new feature in new branch so our original work is intact in the older branch, Also we have option to revert to any earlier state. Tags will be very helpful here. Check the video on tags. You can easily revert to any older tags in case any problem occurs 3. There is a video on Tags and Merging. Pls check 4. If configured Jenkins will take the latest changes from git. Not sure what else you meant here
@sumanp16386 жыл бұрын
Hi Sir, Could you please explain the concept of resolving merging conflicts on GIT?
@RaghavPal6 жыл бұрын
Hi Suman, I will try to create a session soon.
@rajeswarimamilla38956 жыл бұрын
Hi Raghav, The way u explained is very clear and understandable and its very useful for us. It could be better if u can upload more videos on the commands like rebase,stash and so on. Thank you in advance
@RaghavPal6 жыл бұрын
Glad to know this Rajeswari I will do more videos soon.
@maddysunshine41737 ай бұрын
Can git repo be managed without the command line as in if I have to integrate any application so that i can use it as version control and I already have a public online repository available, so can i manage to push the code on git
@RaghavPal7 ай бұрын
Maddy You can manage a Git repository without using the command line. Here are a couple of ways to achieve this: 1. GitHub Desktop: - Use [GitHub Desktop](docs.github.com/desktop/contributing-and-collaborating-using-github-desktop) to interact with GitHub using a graphical user interface (GUI). - It allows you to perform most Git commands (e.g., push, pull, clone, commit) directly from your desktop. - Visual confirmation of changes makes it user-friendly. 2. GitHub Website: - If you prefer a web-based approach, use the GitHub website. - Create, manage branches, commit changes, and open pull requests-all without the command line. Choose the method that suits your workflow best
@chetna_vlog7 жыл бұрын
Hello Raghav, Do you have any tutorial to migrate from CVS to GIT or CVS to GITLab?
@RaghavPal7 жыл бұрын
No Chetna
@rockkersify3 жыл бұрын
Do we need to use git branch if we are using checkout ?
@RaghavPal3 жыл бұрын
Hi Vinod, yes, you need to do it on a branch
@dasigovardhani36636 жыл бұрын
Hi Are you taking any online classes for Ansible, kubernets chef , aws pls let me know
@RaghavPal6 жыл бұрын
Hi Dasi, not currently, may do it in coming 2 months
@vasilevictordurlesteanu24353 жыл бұрын
Hello Raghav Pal! First of all, thank you for the videos you upload, I have a question with regards to branching and merging: Why the branching and merging are not seen as contributions on the GitHub profile page (the green squares), or should those be seen at all? The reason I ask, is that I want to track my progress, and I want it to be visible on the contributions calendar bar. Thank you!
@RaghavPal3 жыл бұрын
Hi Vasile, I am not too sure and will need to get some online help on this
@BengaliStrings4 жыл бұрын
Raghav bro, if you could give the steps in windows machine also it would be very helpfull
@RaghavPal4 жыл бұрын
Hi Sourav, the commands should work on git bas from windows too. Was there anything specific that you could not follow on windows. Pls let me know.
@BengaliStrings4 жыл бұрын
@@RaghavPal yes Raghav, If its ok I can send screenshot and also discuss in person about it. I have dropped an email please kindly check
@RaghavPal4 жыл бұрын
Ok Sourav
@blake45907 жыл бұрын
Thank you so much. I really appreciate your helpfulness.
@RaghavPal7 жыл бұрын
You're welcome
@SahilKhan-mx1rp4 жыл бұрын
Raghav - How can we undelete the deleted Branch in case we need it. Pls suggest.
@RaghavPal4 жыл бұрын
Hi Sahil, you can use the *git reflog* command. Check this - confluence.atlassian.com/bbkb/how-to-restore-a-deleted-branch-765757540.html
@dasariganesh61615 жыл бұрын
Hi Raghav, Can you help me: fatal: bad numeric config value 'exit' for 'color.ui': invalid unit -->How to resolve this? I am using windows.
@RaghavPal5 жыл бұрын
Hi Dasari, Run this command git config --global color.ui false and then try OR Run command git config --global --edit Then in the editor change the value of "status" to "auto" and save.
@monikadixit23373 жыл бұрын
Sir but if i have two or more repo then how does the git know to which repo this branch will be pushed?
@RaghavPal3 жыл бұрын
We provide branch name while pushing
@pjmclenon Жыл бұрын
hello i am super confused there is 3 branches --main, MyNewBranch, master--where does main come from? --im so confused mixed up--anyway master is merged and up to date on local and remote repos Lisa
@RaghavPal Жыл бұрын
Hi The "main" branch is the default branch name for newer Git repositories created on GitHub. In the past, "master" was the default branch name, but GitHub recently changed it to "main" to avoid any language that may carry a negative connotation. Regarding the confusion with branches, it's important to keep in mind that each branch represents a different line of development within a Git repository. The "master" branch is typically used as the main branch of development, where all changes are merged into, and should always represent the latest stable release of the code. In your case, it seems like you created a new branch called "MyNewBranch" to make some changes to the code. Once you were done with your changes, you merged the changes from "MyNewBranch" into "master" and pushed the changes to the remote repository. This should have updated the "master" branch on the remote repository to reflect the changes you made on the "MyNewBranch" branch. If the "master" branch on the remote repository is not reflecting the changes you made, it's possible that the push did not go through correctly. You can try running the command "git log" to see the commit history and confirm that the changes were indeed merged into the "master" branch before attempting to push again.
@mohammedzakaria87834 жыл бұрын
How can we run a test project from the branch? I am confused. Thank you in advance.
@RaghavPal4 жыл бұрын
Hi Mohammed, you just have to checkout the branch and then all commands will run on that branch
@richasingh77237 жыл бұрын
Hi Raghav,very nice tutorial. I have tried everything which you have showed,I have one doubt what is the difference between master and origin/mater or mynewbranch and origin/mynewbranch.
@RaghavPal7 жыл бұрын
Hi Richa, i am happy it helped you. origin refers to the remote repo (url) set as origin. You can set origin with this command git remote set-url origin github.com/USERNAME/OTHERREPOSITORY.git master is the branch. You can also use any other branch .
@arunkumarsanthanam86965 жыл бұрын
Hi Raghav, Thanks for your video, I have tried above commands in my machine. While running git push -u origin branch-name, I am getting fatal: protocol 'https' is not supported this error. How to resolve this. Thanks (I am using windows)
@RaghavPal5 жыл бұрын
Hi Arun, pls re-check your repo url.
@arunkumarsanthanam86965 жыл бұрын
@@RaghavPal ya Raghav.... git remote add origin was not helped for me.. I tried with git remote set-url command.. Its works as expected
@RaghavPal5 жыл бұрын
Glad to know this Arun
@imtiazdahar84514 жыл бұрын
I have confusion in branches, Suppose, we have created two branches named "Master" and "MyBranch" and what if we have two same files in both branches and we update them parallelly in both branches. Now, we have committed our changes in both branches and we want to merge "MyBranch" into "Master" branch, what will happen? If merge conflict occurs then how can we remove those merge conflicts because we might have lot of changes in both files and finding both changes could be difficult. Suppose, we found errors in "Master" branch and some other errors in "MyBranch" and we have fixed both errors on both side, After that, we merge branches then how can we remove merge conflict. I Hope you got my point, I'm new in Git and GitHub. I look forward to hear from you.
@RaghavPal4 жыл бұрын
Hi Imtiaz, there are ways to handle the merge conflicts and changes. I will plan to create a session on this
@imtiazdahar84514 жыл бұрын
@@RaghavPal Thank you very much and I look forward to see you again in an other video.
@ladyharriet41367 жыл бұрын
Thank you so much, explain everything clearly.
@RaghavPal7 жыл бұрын
Thanks for watching.
@pradeeptadas21447 жыл бұрын
Nice videos Raghav....can we connect database tools like SQL_Developer with GIT
@RaghavPal7 жыл бұрын
Thanks Pradeep for liking the videos. Yes, we can connect Git with SQL developer. This article may be helpful : galobalda.wordpress.com/2014/04/09/sql-developers-interface-for-git-interacting-with-a-github-repository-part-1/
@andrekelvin23186 жыл бұрын
What if you want to add different directories in a repository like school management system which have multiple modules each module is one software on it's own(one file directory on it's own) is it best to add each one in different branches ?
@RaghavPal6 жыл бұрын
Yes you can create branches
@bhakta_rg5 жыл бұрын
thanks Raghav for the tutorial
@RaghavPal5 жыл бұрын
You're welcome
@walidnaceri96654 жыл бұрын
Thank you very much for your explanation but what is the purpose of the branch?
@RaghavPal4 жыл бұрын
Hi Walid, Branch is like a parallel version of the code that can be modified without affecting the other versions.
@a0d1i25 жыл бұрын
I got an error while pushing after merge. The error is " rejected. master -> master (fetch first). Error: failed to push some refs to the location".
@RaghavPal5 жыл бұрын
Hi Aditya, Did you trying doing a fetch first. This will help you - stackoverflow.com/questions/28429819/rejected-master-master-fetch-first/28429887
@ImranHossan_myGardening7 жыл бұрын
Nice explanation
@venkatesh92907 жыл бұрын
Can you please show the push command that how to use it in git. please
@RaghavPal7 жыл бұрын
Hi Venkatesh, push command is covered in the session - kzbin.info/aero/PLhW3qG5bs-L8OlICbNX9u4MZ3rAt5c5GG
@lifewithsuryanvi90197 жыл бұрын
hello Ragav...when i am pushing my project (console application of .net) on github..its show me timeout ..please suggest what should i do and i can push folder vise..?
@RaghavPal7 жыл бұрын
do you get any errors in logs. Are you pushing large files. You can Increase the Git buffer size to the largest individual file size of your repo: git config --global http.postBuffer 157286400
@wilsoncardoso1506 жыл бұрын
Thank you so much for your time and effort, for sharing your knowledge with us. Thank you and keep the good work.
@RaghavPal6 жыл бұрын
Thanks Wilson, appreciate your message
@ishakkhan62337 жыл бұрын
best videos ever
@RaghavPal7 жыл бұрын
Thanks Ishak for watching and learning.
@manikanthkommoju31767 жыл бұрын
as i am from Linux admin i can understand easily but lag in few terminologies like branches commit clone etc as i am unfamiliar with these terms
@RaghavPal7 жыл бұрын
Hi Manikanth, i created this series for beginners and i hope you should be able to get most of the things even if you do not know it earlier. In case you still want some deeper knowledge or info, you can search for the particular term on internet. You will find all the info you need.
@pjmclenon Жыл бұрын
hello why do i have enter my passowrd and username each time? its so diffuct to paste the passowrd it doesnt always paste it--can you know how to automate it so we are alrwedy reconized as looged in? Lisa
@RaghavPal Жыл бұрын
will need more details. also pls refer the time in video this is related to
@rajeevghosh20006 жыл бұрын
1. is it possible that that from my current branch I want to push to remote master repo instead of pushing to remote branch. I am in branch 1 and using this cmd "git push origin master". Also, from master(local) to master(remote), how the merge conflict works? I donot see any notification for Create Pull and Merge request
@RaghavPal6 жыл бұрын
Hi Rajeev, you will have to pull, push with branches as per the concepts. This link will help on how to handle merge conflicts stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git
@sweetthirty2 Жыл бұрын
git add -A , git add* and git add . all are the same commands??
@RaghavPal Жыл бұрын
No, `git add -A`, `git add *`, and `git add .` are not exactly the same commands, although they have similarities. Let's break down each one: 1. **`git add -A`:** - This command stages all changes, including modifications, deletions, and new files across the entire repository. It stages everything. 2. **`git add *`:** - This command stages all changes and new files in the current directory. However, it does not consider files or changes in subdirectories. 3. **`git add .`:** - Similar to `git add *`, this command stages all changes and new files in the current directory. However, it also stages modifications in subdirectories.
@kailashsahoo26076 жыл бұрын
HI Raghav, Can you please the PPT (docker,git) in your github so that it will be very helpful for us.
@kailashsahoo26076 жыл бұрын
*share
@RaghavPal6 жыл бұрын
Hi Kailash, do not have them handy now
@OddBallTrails5 жыл бұрын
creating a new branch and checking out to it.... let's make the command more compact "git checkout -b new_branch"
@RaghavPal5 жыл бұрын
thanks for sharing Mukesh
@Subodhhyd4 жыл бұрын
I want to keep the a branch permanently, it is possible?
@RaghavPal4 жыл бұрын
Hi Subodh, what do you mean by that. The branch remains unless you delete it.
@tusharpimple74836 жыл бұрын
hey raghav, how can i create a branch in existing repo.?
@RaghavPal6 жыл бұрын
Hi Tushar, you can do as shown in the video. What issue did you face.
@tusharpimple74836 жыл бұрын
hey raghav, i already have 7 existing repo. i am unable to create branch in a particular repo. and 2nd que. is when we add empty directory in a branch why do we need to create .gitignore file? what is the meaning of .?
@RaghavPal6 жыл бұрын
Hi Tushar, in .gitignore file we generally give the items that we do not want to go to the repo. For e.g. if you have a project and it has a folder that contains images in .png ext. And you do not want this to go to the repo as it will increase the repo size, you can give *.png in .gitignore file.
@tusharpimple74836 жыл бұрын
thanks raghav
@PrasannaMoharanalipp-prasanna6 жыл бұрын
Hi , I got this error while putting git push -u origin branch1 . before it i was facing key gen issue & i resolved it but now again facing this branch pushing issue . please help me on this . git push -u origin branch1 error: src refspec branch1 does not match any error: failed to push some refs to 'my repo link '
@RaghavPal6 жыл бұрын
Hi Prasanna, did you commit before pushing. You need to do git add & git commit before pushing. stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git
@pjmclenon Жыл бұрын
i pushed the bracnjh master and it does not update on github like the merge on my local machine why?
@RaghavPal Жыл бұрын
There could be multiple reasons why the branch didn't update on GitHub after pushing the changes. Here are a few things you can check: Check if you pushed the changes to the correct repository and branch. Ensure that you have the appropriate permissions to push to the repository. Verify that your internet connection is stable and there were no errors during the push. Check if there are any conflicts between your local branch and the remote branch on GitHub. If there are any conflicts, you'll need to resolve them before the changes can be merged. If you have checked all of the above and the issue persists, you can try force pushing the changes to the remote repository. However, this should only be done as a last resort since it can potentially overwrite other changes in the repository
@kaltube48172 жыл бұрын
Well Done!
@RaghavPal2 жыл бұрын
Thanks
@ishakkhan62337 жыл бұрын
can i merge branch with login page ? and how please explani
@RaghavPal7 жыл бұрын
branch with login page? i did not exactly understand. You can merge any branch with other branch like master.
@pallavisharma66824 жыл бұрын
sir i want to know that,I don’t have any idea about coding And I did MCA,so Am i able to become a devops engg??
@RaghavPal4 жыл бұрын
Yes you can, You can start now, learn what all is needed. Can take help from here - automationstepbystep.com/
@bmkrissh87145 жыл бұрын
How to check - which is active branch if there is more than one?
@bmkrissh87145 жыл бұрын
OK , git branch --list , is the command. * shows active branch
@varsha54772 жыл бұрын
error: pathspec 'master' did not match any file(s) known to git I am getting this error whenever I use the git checkout master.. Pls help😞😞
@RaghavPal2 жыл бұрын
Hi Varsha, pls check this discussion stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn
@varsha54772 жыл бұрын
@@RaghavPal No sir, in my gitbash while creating a repo master branch was not added automatically.. so in another webpage of stackoverflow someone said... "master is just the name of a branch, there's nothing magic about it except it's created by default when a new repository is created. You can add it back with git checkout -b master.".. so I did this and it worked but is it true that master branch is not so important?
@RaghavPal2 жыл бұрын
Hi Varsha, as said, master is just a branch, just that it gets created at 1st, you can rename it too
@varsha54772 жыл бұрын
@@RaghavPal ok sir, thank you
@sickbro37037 жыл бұрын
Raghav - your videos are awesome, though for the life of me I cannot figure out the following error when it comes to checking out a branch: `error: pathspec 'foo' did not match any file(s) known to git.` I've been on stackoverflow, git-scm, github and googled it a million times. When I run `git branch -r` however, I see both the master branch and my foo branch: `origin/foo` and `origin/master`. I'd love you forever if you have any input or can direct me to a solution! Thanks in advance
@RaghavPal7 жыл бұрын
Hi, glad you liked it. Did you try to do git fetch and git checkout before checking out branch
@quincyg.83375 жыл бұрын
why I could not git push after I successfully typed git merge new_branch there, also the delete branch both 2 lines commands doesn't work in my laptop, could anyone let me know why, thx
@RaghavPal5 жыл бұрын
Hi Quincy, pls see if this helps - stackoverflow.com/questions/13597494/git-merge-and-push
@sunils30447 жыл бұрын
May i knw what is solution for below Error while pushing to git hub ---------------------------------------------- $ git push -u origin branchnew Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
@RaghavPal7 жыл бұрын
hi Sunil, Check this stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey stackoverflow.com/questions/38556096/github-permission-denied-publickey-fatal-could-not-read-from-remote-reposit
@sushantkumar67554 жыл бұрын
Raghav, info that you delivered was totally worth it but a got an issue in the last 2 minutes. I am using windows 7 (32 bit), error says; master->master (fetch first). error: failed to push some refs to 'github......' Please help me short out this issue.
@RaghavPal4 жыл бұрын
Hi Sushant, looks like there were some new commits and you will have to pull first before pushing. You may also have to do a rebase but do with caution. This can help stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to-remote
@pjmclenon Жыл бұрын
PS C:\Users\Main\Desktop eact\test_repo2> git checkout master Already on 'master' Your branch is up to date with 'origin/master'. PS C:\Users\Main\Desktop eact\test_repo2> --i am really more consfused i tried to create a main bracnh which it did but whn i switch to master it says its already the master --how come in github main is not merged whaterver ok whatebv
@RaghavPal Жыл бұрын
It seems like you have created a new branch called "main" locally but haven't pushed it to the remote repository on GitHub. Therefore, on GitHub, the default branch is still "master". When you switched to the "master" branch, Git is telling you that you are already on the latest version of the "master" branch that is in the remote repository. To merge your changes from the "MyNewBranch" branch into the "master" branch, you need to: Make sure you are on the "master" branch locally: git checkout master Merge the changes from "MyNewBranch" into "master": git merge MyNewBranch Push the changes to the remote repository on GitHub: git push origin master After these steps, the changes from "MyNewBranch" should be merged into the "master" branch both locally and on the remote repository.
@pjmclenon Жыл бұрын
ok i will check
@sharatchandra20455 жыл бұрын
Good Tutorial
@RaghavPal5 жыл бұрын
Thanks for watching Sharat
@farnaazkauser19936 жыл бұрын
How to merge two branches of different repositories?
@RaghavPal6 жыл бұрын
I will check and plan to do a session on this.
@pjmclenon Жыл бұрын
This branch is 2 commits ahead, 2 commits behind main. ----this is what it says in my master and MyNewBranch--how is this possible? on my local it says main IS master --i dont unberstand ok Lisa
@RaghavPal Жыл бұрын
It's possible to have the message "This branch is 2 commits ahead, 2 commits behind main" if you have made changes in both the master and MyNewBranch branches, but haven't merged those changes to the main branch yet. When you create a new branch from an existing branch (in your case, you created MyNewBranch from main), the new branch will initially have the same content as the original branch. Any changes you make in the new branch won't automatically be reflected in the original branch until you merge the changes. If you made changes in both the master and MyNewBranch branches, those changes are independent of each other until you merge them into the main branch. So, if you switch to the master branch and see the message "This branch is 2 commits ahead, 2 commits behind main," it means that the master branch has two commits that haven't been merged into the main branch, and two commits from the main branch that haven't been merged into the master branch. To resolve this, you can merge the changes from both branches into the main branch so that all the changes are in one place
@pjmclenon Жыл бұрын
@@RaghavPal thank you i will check
@Subodhhyd4 жыл бұрын
What if we do not do merge?
@RaghavPal4 жыл бұрын
The changes will not come to the parent or master branch
@pjmclenon Жыл бұрын
C:\Users\Main\Desktop eact\test_repo2>git push -u origin MyNewBranch fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. C:\Users\Main\Desktop eact\test_repo2>--did you fforget previous steps? it doesnt work Lisa
@RaghavPal Жыл бұрын
It seems like Git is not able to find the remote repository called 'origin'. Here are a few things you can check: Make sure that you have created a remote repository called 'origin' on a Git hosting service like GitHub, GitLab, or Bitbucket. Check if you have added the remote repository to your local Git repository. You can do this by running the following command: git remote -v This will show you a list of remote repositories that your local Git repository is connected to. Make sure that 'origin' is listed there. If 'origin' is not listed when you run the git remote -v command, you can add it using the following command: git remote add origin Replace with the URL of your remote repository. Once you have added the remote repository, you can try pushing your branch again using the command: git push -u origin MyNewBranch Make sure to replace 'MyNewBranch' with the name of your branch.
@zulfquarmohammed38715 жыл бұрын
hi addVideo 5:- Git and GitHub Beginner Tutorial 5 - Branching and Merging = Today we will learn 1. What are branches :-we create branches we do perform testing and then only we add folders to master branch so that whole functinality don’t get effected Go to cmd prompt-go to path of folder in gitnow u r in folderenter git statusnothing to commit tree is clean 2. How to create branchnow add branch by cmd git branch mynew branch 3. How to checkout branch to start working on branch u have to check out using cmd git checkout branchnamenow whatever changes u make to folder will go to project folder now add text.txt file in the foldergit statusgit add . git commit -m “added text.xtxt file”git stautus nothing to commit git push -u origin mybranch-> now u have two branches one master and mynewbranch in new branch only u have test.txt if cmd git checkout master in folder also u don’t have test.txt file 4. How to merge branch to master u have to checkout master and then merge mynewbranch cmd git checkout mastergit merge mynewbranch git push -u origin master 5. How to delete branch (local and remote) git branch -d “branch name” - delete from local git push origin -delete “branch name” - delete from remote
@RaghavPal5 жыл бұрын
Hi Zulfquar, will check this
@abdulwadoodaziz33715 жыл бұрын
Amazing
@RaghavPal5 жыл бұрын
Thanks Abdul
@biswajitsahu34205 жыл бұрын
Thanks ...
@RaghavPal5 жыл бұрын
You're welcome Biswajit
@gaojianjin8 жыл бұрын
Your video and audio explanation is not in sync at end part. But thanks for the video anyway.
@RaghavPal8 жыл бұрын
thanks for liking. I did review it again, did not find anything out of sync. Hope this is fine.
@rajeshdevan60514 жыл бұрын
Hi Raghav, for merging master and MyNewBranch i am getting this error ! [rejected] master -> master (fetch first) error: failed to push some refs to 'github.com/rajeshgithu/Repo2.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Please suggest me the solution.
@RaghavPal4 жыл бұрын
Hi Rajesh, You can fetch pull master first and then do the merge
@rajeshbe22344 жыл бұрын
@@RaghavPal Ok Raghav, Let I do as per your instructions. Thanks.
@jimferko93754 жыл бұрын
Hi Raghav, great tutorial. All good. However on my git commands : 1.-git push -u origin master and 2.git push origin --delete My NewBranch Authentication with username and Password are still required Note: I have configured credentials with commands a) git config --global user.email "yourGitHub@email.com" b)git config --global user.name "yourGitHubusername" Plus am receiving an email : Basic authentication using a password to Git is deprecated and will soon no longer work.
@RaghavPal4 жыл бұрын
Hi Jim, I will update this with a new session
@pjmclenon Жыл бұрын
totally confuised why is there a main? there is no main on my local machine--i do not underatnd-- i cannot push to main cuz there is no main on my computer very lost whatever Lisa--its 2023 and its so confusng to fiund up to date lessons theey are all mixed up in versions
@RaghavPal Жыл бұрын
have replied on your earlier comment
@gourangasamal4 жыл бұрын
Hi Raghav, Thanks for Tutorial. You explain in very simple way I understand all git commands properly.