GIT and Github

GIT and Github


1. The file in which we write the code is known as programming file and the file resides in some folder that folder is known as workspace, work in progress or working area.

2. GIT is one of the tool that provide SCM facility. SCM means source code management

3. Storage Area in which we store the backup of our code in get it is known as commit area the code is associated with some timeline.

4. GIT is a SCM tool that also provide vcs version control system facility

5. After the first backup of our code when developer do some changes in code then git will track the changes on per line basis all these tracking data is stored in the area that area is known as staging area.

6. Add is the one option that is used to track the file and store the file in staging area. 

7. when we create backup of our second version of code then it will not create backup of whole code it will create backup of only the line of code that has been changed from previous version but when some person see the version of our code, git will take reference or pointer from the previous version and display the version 1 code plus modified line of code that is stored in staging area.

This kind of backup is known as snapshot point in time backup.

8. GIT Bash is a software that provide bash cell or terminal with all the GIT command we can say it is CLI way to use GIT git.

9. The folder in which manages the Storage Area like commit area and staging area that folder is GIT repository.

10. git init - is used to initialise the repository as GIT repository.

11. Git has pointer or reference known as Head that is used to show the last commit means latest version of a file.

12. git reset commit_ID file_name

it will roll back to the version you want of the file.

13. git log - it will display the entire history with commit ID, date, username, author name

14. Providing extra storage in which we had the copy of our code this code is added so that we can perform changes on it without disturbing the main working area, that storage is known as branch, so extra storage is known as feature branch and the main working area that is a GIT repository is known as master branch.

15. When we create feature branch whole data including code and history is added in feature branch from master branch. feature branch is also known as upstream branch

16. git checkout master - help the user to switch to master branch

17. CVCS- centralised version control system

providing the entire repository to some server that anyone who know the IP of my server can connect to the server and can download the whole repository so it's our choice we want to set up the centralised server by our own or we can use some service provider like cloud.

18. So github is a centralised version control system

19. Generally developer use origin as a name for remote Repo in github

20. To track the master branch of a local system is behind or add from remote repository branch we use

Git branch - u any_name master

21. P4merge is a great tool that is used for comparing two versions we can also see the difference between version in github.

22. git config - - global - l

it will show username and email name that is set globally for git in our local system

23. Fetch will fetch the information what has been changed according to this information we can take decision that we have to use pull or not so fetch is more secure option than pull



---------------------------------------------------------------------------------------------------------------

1. Master branch is also known as release branch because whatever data inside master branch will generally provide to production environment. It is also known as base branch

2. When we create a new version that git will create one tree and attached some ID. tree can be understood like a data structure or a box. 

3. If we want that as soon as we commit the version in commit area then git will automatically push the version to some CVCS like github for this git uses hooks all local hooks. 

4. In github the default branch name is main that is actually master but the name can be changed

5. Webhoks are set up in github for providing automation like as soon as some new version come up in GitHub repository, get well send this version to Jenkins or send some mail to developers kind of thing

6. Fork option in github is used to create copy of Repo that exist in some other GitHub account to our github account

7. After performing the changes in Repo in our account if we want to merge this Repo of our account to the account from which we fork this Repo, create and pull request option is used

8. It is like sending the request to the owner of the account for merging the repo that we have copied in our account.

9. In GitHub in collaborator we can set which user want to provide the access of a particular Repo of our github account. So all the admin operation this user can perform for this repo

10. Git kraken is a tool or software that provide graphical way for doing all git operations like we do in CLI by using GIT Bash

11. In case of fast forward merging all the data of feature branch is copied or merged in master branch means all the timeline of feature branch is merged in master branch

12. In fast forward we have a concept known as squash. 

13. Squash - whatever data we have latest in feature branch that is copied in master branch after this create new version for this data in master branch this is useful when master branch is not interested in history of feature branch they just want the latest version data of feature branch

14. Rebase - it is used when base branch has changed something and we want that change in feature branch. it is look like merging but it is different from merging.

15.Recursive merging - this kind of merging is also known as 3 way merging. 

in this case the new version have 2 Parent. both master and feature are working parallel both don't know about Each Other commits.

16. Cherry pick - to pick the specific version from feature branch and copy its data inside the master branch when the data is copied in master branch it basically create a new version for this data 8  master branch.

17. Merge conflict - when same line of code is changed in both branches dhandha conflict arises at the time of merging the branches is known as merge conflict

18. To resolve this conflict user have to go inside the file and remove the line we want to remove and save it then add then commit the file and conflict will be resolved.

19. There is one more way to resolve this conflict by merge tool. Merge tool that provide to resolved merge conflict is p4merge tool

20. .Orig is the file that is basically the backup of the file due to which merge conflict arises it contain both line of code that is written and feature and master branch

21. Stash - it can be understood as area in working area in which we keep our file( this file is having some changes that to be done in future) before committing in commit area.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了