debian-mirror-gitlab/doc/topics/git/index.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
5.2 KiB
Markdown
Raw Normal View History

2019-09-04 21:01:54 +05:30
---
2020-10-24 23:57:45 +05:30
stage: Create
group: Source Code
2022-11-25 23:54:43 +05:30
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments"
2019-09-04 21:01:54 +05:30
type: index
---
2021-03-11 19:13:27 +05:30
# Git **(FREE)**
2017-08-17 22:00:37 +05:30
Git is a [free and open source](https://git-scm.com/about/free-and-open-source)
distributed version control system designed to handle everything from small to
2019-09-04 21:01:54 +05:30
large projects with speed and efficiency.
2017-08-17 22:00:37 +05:30
[GitLab](https://about.gitlab.com) is a Git-based fully integrated platform for
2023-04-23 21:23:45 +05:30
software development. Besides Git functionalities, GitLab has a lot of
2017-08-17 22:00:37 +05:30
powerful [features](https://about.gitlab.com/features/) to enhance your
2021-09-30 23:02:18 +05:30
[workflow](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/).
2017-08-17 22:00:37 +05:30
We've gathered some resources to help you to get the best from Git with GitLab.
2019-09-04 21:01:54 +05:30
More information is also available on the [Git website](https://git-scm.com).
2017-08-17 22:00:37 +05:30
## Getting started
2021-04-17 20:07:23 +05:30
The following resources can help you get started with Git:
2019-09-04 21:01:54 +05:30
- [Git-ing started with Git](https://www.youtube.com/watch?v=Ce5nz5n41z4),
a video introduction to Git.
2023-07-09 08:55:56 +05:30
- [Make your first Git commit](../../tutorials/make_first_git_commit/index.md)
2019-09-04 21:01:54 +05:30
- [Git Basics](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics)
- [Git on the Server - GitLab](https://git-scm.com/book/en/v2/Git-on-the-Server-GitLab)
2018-03-17 18:26:18 +05:30
- [How to install Git](how_to_install_git/index.md)
2023-06-20 00:43:36 +05:30
- [Git concepts](terminology.md)
2017-08-17 22:00:37 +05:30
- [Start using Git on the command line](../../gitlab-basics/start-using-git.md)
2018-11-08 19:23:39 +05:30
- [GitLab Git Cheat Sheet (download)](https://about.gitlab.com/images/press/git-cheat-sheet.pdf)
2019-09-04 21:01:54 +05:30
- Commits:
2021-11-11 11:23:49 +05:30
- [Revert a commit](../../user/project/merge_requests/revert_changes.md#revert-a-commit)
2022-10-11 01:57:18 +05:30
- [Cherry-picking a commit](../../user/project/merge_requests/cherry_pick_changes.md)
2019-12-26 22:10:19 +05:30
- [Squashing commits](../gitlab_flow.md#squashing-commits-with-rebase)
2020-05-24 23:13:21 +05:30
- [Squash-and-merge](../../user/project/merge_requests/squash_and_merge.md)
- [Signing commits](../../user/project/repository/gpg_signed_commits/index.md)
2021-06-08 01:23:25 +05:30
- [Git stash](stash.md)
2020-05-24 23:13:21 +05:30
- [Git file blame](../../user/project/repository/git_blame.md)
- [Git file history](../../user/project/repository/git_history.md)
2023-05-27 22:25:52 +05:30
- [Git tags](../../user/project/repository/tags/index.md)
2018-03-17 18:26:18 +05:30
2019-09-04 21:01:54 +05:30
### Concepts
2018-03-17 18:26:18 +05:30
2020-05-24 23:13:21 +05:30
The following are resources on version control concepts:
2018-03-17 18:26:18 +05:30
2019-12-21 20:55:43 +05:30
- [Why Git is Worth the Learning Curve](https://about.gitlab.com/blog/2017/05/17/learning-curve-is-the-biggest-challenge-developers-face-with-git/)
- [The future of SaaS hosted Git repository pricing](https://about.gitlab.com/blog/2016/05/11/git-repository-pricing/)
2020-05-24 23:13:21 +05:30
- [Git website on version control](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control)
2019-09-04 21:01:54 +05:30
- [GitLab University presentation about Version Control](https://docs.google.com/presentation/d/16sX7hUrCZyOFbpvnrAFrg6tVO5_yT98IgdAqOmXwBho/edit?usp=sharing)
2018-03-17 18:26:18 +05:30
2021-06-08 01:23:25 +05:30
### Work with Git on the command line
You can do many Git tasks from the command line:
2021-11-11 11:23:49 +05:30
- [Cherry-pick](cherry_picking.md).
2023-07-09 08:55:56 +05:30
- [Getting started with Git](../../tutorials/make_first_git_commit/index.md).
2021-06-08 01:23:25 +05:30
- [Git add](git_add.md).
- [Git stash](stash.md).
- [Rollback commits](rollback_commits.md).
- [Unstage](unstage.md).
2019-09-04 21:01:54 +05:30
## Git tips
2018-03-17 18:26:18 +05:30
2019-09-04 21:01:54 +05:30
The following resources may help you become more efficient at using Git:
2018-03-17 18:26:18 +05:30
2019-10-12 21:52:04 +05:30
- [Useful Git commands](useful_git_commands.md) collected by the GitLab support team.
2019-12-21 20:55:43 +05:30
- [Git Tips & Tricks](https://about.gitlab.com/blog/2016/12/08/git-tips-and-tricks/)
- [Eight Tips to help you work better with Git](https://about.gitlab.com/blog/2015/02/19/8-tips-to-help-you-work-better-with-git/)
2018-03-17 18:26:18 +05:30
## Troubleshooting Git
2019-09-04 21:01:54 +05:30
If you have problems with Git, the following may help:
2018-03-17 18:26:18 +05:30
- [Numerous _undo_ possibilities in Git](numerous_undo_possibilities_in_git/index.md)
2019-09-04 21:01:54 +05:30
- Learn a few [Git troubleshooting](troubleshooting_git.md) techniques
2017-08-17 22:00:37 +05:30
## Branching strategies
2020-05-24 23:13:21 +05:30
- [Feature branch workflow](../../gitlab-basics/feature_branch_workflow.md)
- [GitLab Flow](../gitlab_flow.md)
2018-03-17 18:26:18 +05:30
- [Git Branching - Branches in a Nutshell](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell)
- [Git Branching - Branching Workflows](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows)
2017-08-17 22:00:37 +05:30
## Advanced use
2019-09-04 21:01:54 +05:30
The following are advanced topics for those who want to get the most out of Git:
2021-01-03 14:25:43 +05:30
- [Introduction to Git rebase, force-push, and merge conflicts](git_rebase.md)
2020-03-13 15:44:24 +05:30
- [Server Hooks](../../administration/server_hooks.md)
2017-08-17 22:00:37 +05:30
- [Git Attributes](../../user/project/git_attributes.md)
2021-04-17 20:07:23 +05:30
- Git Submodules: [Using Git submodules with GitLab CI](../../ci/git_submodules.md)
2019-10-12 21:52:04 +05:30
- [Partial Clone](partial_clone.md)
2017-08-17 22:00:37 +05:30
## API
2019-09-04 21:01:54 +05:30
[Gitignore templates](../../api/templates/gitignores.md) API allow for
Git-related queries from GitLab.
2017-08-17 22:00:37 +05:30
2020-05-24 23:13:21 +05:30
## Git Large File Storage (LFS)
2017-08-17 22:00:37 +05:30
2019-09-04 21:01:54 +05:30
The following relate to Git Large File Storage:
2019-12-21 20:55:43 +05:30
- [Getting Started with Git LFS](https://about.gitlab.com/blog/2017/01/30/getting-started-with-git-lfs-tutorial/)
2020-06-23 00:09:42 +05:30
- [Migrate an existing Git repository with Git LFS](lfs/migrate_to_git_lfs.md)
2020-04-22 19:07:51 +05:30
- [Removing objects from LFS](lfs/index.md#removing-objects-from-lfs)
- [GitLab Git LFS user documentation](lfs/index.md)
2021-06-08 01:23:25 +05:30
- [GitLab Git LFS administrator documentation](../../administration/lfs/index.md)
2019-12-21 20:55:43 +05:30
- [Towards a production quality open source Git LFS server](https://about.gitlab.com/blog/2015/08/13/towards-a-production-quality-open-source-git-lfs-server/)