Software is often built by several people who work together on the same code remotely or locally. This means that several people will be making changes to the same code. For this to be possible without conflicting code changes there is a tool named Git. What is Git?Git is a version control system that keeps track of code and file changes and lets you collaborate with other developers on the same project. It is available for Windows, Linux, and Mac os Below are some of the basic Git commands. You can get it here. Git config First of all, an identity is required to differentiate you from other users who will also be contributing to the same project. To create one you will use git config –global user.name and git config –global user.email. The global parameter configures the same user name and email for all repositories. It can be excluded if you want to configure a username and email for each repository. Git init Used to create a repository. To create a repository you navigate to the chosen directory and use git init to initialize a repository in the directory. Git add Now let’s assume you have created a file, at this point the file is not tracked by Git although it is in the repository. To add it to tracked files use git add filename. You can add all files at once by using git add -A. adding files is also known as staging changes. Git status At some point, you will want to check which files are tracked by git and which ones are not. To do this you can use the git status command. Git branch Imagine you are working on an existing project and want to make some improvements. Altering the main project can be risky. Git can create a branch(which is a copy of the repository's main branch) and let you make changes comfortably and test them without affecting the repository's main branch.To create a new branch you will use git branch branchname. To view the branches of a repository you can use git branch -a. To delete a branch you can use git branch -d branchname. Git checkout git checkout branchname. Used to switch to another branch. git checkout -b branchname switches to another branch and creates it if it does not exist. Git commit This creates a snapshot of the repository. To commit the changes you have made you will use git commit -m “message/description”. The message is essential because it allows the developer to communicate to others what changes he or she has made to the project. The message also allows developers to roll back to a previous point if they want to. Git merge The Git merge command allows you to merge two branches into one branch. This usually happens r testing the changes made on the other branch. To merge the two branches you will use git merge branchname(while on the on the main branch, the branchname will the the other minor branch). If the two branches do not have conflicting differences the merge will be successful, otherwise, you will be presented with an error message with problems that should be fixed. Git log Git keeps a log for all operations in the repository. To view the log, you will use the git log command. The log shows the username and email of the author of a change made, the message, and the date of the commit. This is not all, there are many git commands you should know. You can also check out the Git tutorial on the w3schools website.
3 Comments
Innocent WaluzaComputer network engineering student at the University of Malawi. Time and energy are the most limited resources we have in our lives, So why waste them doing things in a traditional way. Below are some of the AI tools which can save you time and energy and boost your productivity. 1.Grammarly Grammarly is a content writing tool that corrects spelling, and grammar and improves clarity to give your readers a clear message of what you want to share. It also checks plagiarism which can save you from legal battles. Using Grammarly will improve your message delivery and save you from the shame that comes from writing broken English. It is offered for free and you can pay if you want more. 2.Beautiful.ai Beautiful.ai is an online presentation maker that allows you to make an expert-like presentation without being an expert. By using beautiful.ai you will be able to design beautiful presentations which will please your lecturer customers or colleagues. Beautiful.ai will also save you time. 3.Growbots Growbots is an online marketing platform. It aims at easy and effective, marketing whereby you can market your business to prospective customers than targeting masses of people who are not interested in your product. Growbots will save you time and money because it is precise. Adding to that it will also save you energy as you don’t have to reply to every customer because replies can be scheduled automatically using AI detection. 4.Study Crumb Summarizer As the name says, Study Crumb Summarizer is a free summary-generating tool. If you are a college student you mostly have to write a summary from a given article or a topic from a book, well this tool will save you the time and energy you put into summarizing what you have read. All you have to do is copy and paste the text then click ‘summarize’ and you will get your summary. 5.Many Chat Manychat is a chatbot used for business sales and marketing. It provides automated interactive conversations in Instagram direct messages, Facebook Messenger, WhatsApp, and SMS. If you already use Shopify, Google Sheets, Mailchimp, Klaviyo, Hubspot, or Zapier, Manychat can be integrated with your existing tools. Manychat will help you provide the best customer care and help your business grow as the AI will interact with the customers on your behalf while you are taking care of other things. 6.Tabnine This one is for computer programmers like me. Tabnine is an AI assistant for software developers that auto-completes code during the writing stage. I also use Tabnine and I see the difference between the time I was not using it and now because I do not have to write the whole line of code or write the variables I have already stated above. Sometimes the AI can write the whole method and all I have to do is press the Tab button to confirm the suggested code. This saves time and energy which could have been spent re-writing variables and long lines of code. AI will not replace you but a person using AI will replace you
|
AuthorInnocent Waluza, ArchivesCategories |