Github Tutorials

Tutorial 01:

Github is a distributed source code version system.

- It stores revisions to a project History in just one directory.

- One can rewind to any revision they want to

- Work on new features without messing up the main code base (by using branching)

- Makes it easier to collaborate with other developers. (Each person has it's own copy of the project on their local machines.)


Tutorial 02:

Configuring Git for the first time:
1. To Check git version:

cmd: git --version

2. Configure user:

cmd:

git config --global user.name krunalkadu
git config --global user.email krunalkadu.01@gmail.com

3. To check the username with which you are currently logged in:

git config user.name

4. To list files in a directory:

cmd: ls

5. Create a file:
cmd: touch index.html

6. Delete a file:
rm index.html


Commits are like Savepoints. One can later rewind to a previous savepoint/commit



When you are done changes to a file and you want to commit it later, you can move it to staging and then commit it later.



Tutorial 03: Initializing a repository

- You can initialize a repository in Git by using command in the project directory:
   git init
- You will see that there a .git folder will be created in the location. All the changes in this project will now be recorded in this .git folder.




Tutorial 04: How to move files to staging.

Whenever, you make changes to a file and want to later commit them you can move them to staging and commit them later.





 


Comments

Popular posts from this blog

Jenkins CICD in One Page

Why do we need a build tool?

Deutsche Bank Interview Questions - 2024