![]() Suppose, you have given same name to your local folder & your github repository i.e, Demo. Open Git Bash and cd into the folder that you created in the above step. Make a new repository (e.g, Demo) by filling out the details.Ĭreate a new folder (e.g, Demo) on your laptop and create a new file ‘demo.txt’ file inside that folder. Visit the official github website and signup (if you haven’t done already) git -version Make sure that you complete all the below steps: To verify that git is properly installed on your machine run the below command. And that’s all, it will open a new terminal screen where we will write different git commands. Go to Desktop → Right Click → Select the option ‘Git Bash Here’. If you don’t know where to find Git Bash here it is. Once the installation process has finished, open the Git Bash where we will write git commands. How to use Git & GitHubįirst of all, go ahead and download git from this official link. So let's walk you through each of them now. git config -global user.email ‘Your Email’.git config -global user.name ‘Your Name’.git remote add origin ‘your_github_repository_url’.Below are all the Git commands that we will learn: While the project folder that lives on our local machines are called local repository. We can access that repository by some unique url that github provides for us. It’s called remote because github hosts it somewhere in the world. The project folder that lives on the github servers are called remote repository. It’s just a naming convention that git uses. What is a local or hosted repository?Ī repository simply means project folder where our different files are present. So, now that we know what’s git and github let’s see how to use it. And Github is just a place where our code lives. In simple terms, Git just keeps the track of our code. So, is there any tool that can do this workload for me. Hmm, It’s not possible for me to go and inform my teammates everytime I made some changes to these files. Now, let’s say that Bob has made some minor changes to one of the files and a sudden thought pops up in his mind. Each one of them has their own copy of their source code saved on their local machines (Laptop/Desktop). ![]() Well, let’s assume that a web app is hosted somewhere in the world, and the team that created this web app has 3 core members Alice, Bob and Jack. So, without wasting any more time let’s get started. Well good news! This is a guide for anyone who wants to learn git simply, efficiently and as fast as possible. There’s no question that Git is tricky at first and takes time to get used to, and all developers struggle with it initially. We can create any number of repositories(projects) on github. In simple terms, it is a place where all our code lives. Git is simply a tool where developers collobarate and work together while GitHub is a git repository hosting service.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |