GithubHelp home page GithubHelp logo

git-cheatsheet's Introduction

I am editing the README file. Adding some more details about the project description.

git-cheatsheet

1- Because it simplifies the process of managing and maintaining software projects and gives us capabilities such as code retention, versioning and tracking written code.

2- A git repository has a directory named .git that is located inside the project and tracks all files of project. A good repository has readme,.gitignore and licence.

3- A good document should have a description of the project. What is this project? Where is it for? What does it contain? How to install and run it? and how the other persons can contribute to this project?

4- git clone command makes a copy of the repository to a specific target.

5- In the directory that is the local repository, run the git pull command.

6- Use checkout to change the working directory or to retrieve working tree files. git revert, reverts to the previous commit and creates a new commit after that and finally head points to the reverted commit. git reset gives a commit and transfers the Head to that commit and Removes subsequent commits.

7- In rebase, first the commits of the target branch (the brunch in which we want to rebase from the other brunch) are placed in the tree and the commits of the feature brunch are placed next to the tree. But in merge, changes of the target and feature commits are merged into a separate commit.

8- Use git log

9- Use git log command

10- The tag in git is a reference to a specific point in the git history. The tag is used to create a version at a specific point in the git. The tag is like a branch that does not change. For example, to create a tag called v.3.0, use the following command:

git tag -a v3.0 -m "New release for v3.0"

11- To participate in a project in git, we clone a copy of the project on our host and make the necessary changes to a dedicated branch. After applying the necessary changes, in order to merge changes we will send a merge request to the remote repository in main branch.

12- In a software project, if we have several developers and each developer wants to apply and test their changes independently and isolated in the project, it creates a branch of the project for itself and after the finalization of the changes, it merges in the final branch. Merge or rebase can be used to merge two branches.

@dwsclass dws-dev-004-git

git-cheatsheet's People

Contributors

ehsantux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.