5,323
edits
(→Usage) |
|||
Line 1: | Line 1: | ||
Git is a popular version control system made by Linus Torvalds. | Git is a popular version control system made by Linus Torvalds. | ||
==Basic Usage== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Clone or download a repository | # Clone or download a repository | ||
Line 23: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Branches== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Make a branch | # Make a branch | ||
Line 36: | Line 35: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Pull Requests== | |||
==Migrating Repositories== | |||
How to migrate repositories to another Git server | How to migrate repositories to another Git server | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 51: | Line 50: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Changing Remote URL== | |||
[https://help.github.com/en/articles/changing-a-remotes-url Reference]<br> | [https://help.github.com/en/articles/changing-a-remotes-url Reference]<br> | ||
You will need to change the remote url if it is changed on the server. E.g. if you change the project name.<br> | You will need to change the remote url if it is changed on the server. E.g. if you change the project name.<br> | ||
Line 58: | Line 57: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==gitignore== | |||
.gitignore is used to ignore certain files to make sure they do not get accidentally pushed to the remote git repo.<br> | .gitignore is used to ignore certain files to make sure they do not get accidentally pushed to the remote git repo.<br> | ||
You can find a collection of .gitignore files on [https://github.com/github/gitignore Github's gitignore repo].<br> | You can find a collection of .gitignore files on [https://github.com/github/gitignore Github's gitignore repo].<br> | ||
Or you can create a custom .gitignore file at [https://www.gitignore.io gitignore.io]. | Or you can create a custom .gitignore file at [https://www.gitignore.io gitignore.io]. | ||
==gitattributes== | |||
.gitattributes are used to give attributes to paths.<br> | .gitattributes are used to give attributes to paths.<br> | ||
They can be used to assign programming languages to filenames.<br> | They can be used to assign programming languages to filenames.<br> |