The following guide covers the basics of : installing Git on your system, initializing repository, commiting files, adding remote, and collaborating on branches with other users. This is some pretty straightforward stuff, good to keep at hand until Git becomes your lifelong friend for good and bad. Git The best way to understand how Git works is to run Git commands from your terminal. If you’re a Windows user make sure to run git bash when adding your Git package. A NOTE BEFORE YOU GET STARTED Installation First you need to choose and install the package for your OS: Mac OS X Windows Linux Creating repository Once the Git is installed, go to the folder with your project and run git init to initialize Git in this directory. This command will add a directory to your folder that will store data about the repo. /.git Adding files to the repository Now we need to tell Git to put the files under so we can commit them. To do this, run: version control git add . With ‘git add’ you can define which files you want to add to the next commit: will add a specific file git add filename will add all files from the directory. git add . Once the files have been added, you can commit them to the repository: git commit -m ‘Added all files to the repository’ where stands for the commit message. Always write something that describes your activity in the commit to avoid mess when browsing the history later on. -m To view which files have been added and/or modified, use… Want to learn more? . Check out the full article here
Share Your Thoughts