Coder Social home page Coder Social logo

sandbox's Introduction

Development workflow

Branches are one of the basic concepts of git. There is a main branch master, and new branches are created out of the main master branch. Every branch represents a feature you are working on, and it has different series of commits. Once a feature is complete, the new branch is merged into the master branch.

Branches allow us to work on more than 1 feature at the same time, thus helping us avoid mixing of commits. If during the process, there are useless commits added and the whole branch is messed up, you can easily delete the branch and create a fresh branch from the main master branch.

Note: Never ever commit or rebase on your master branch.

The development workflow goes like this :

  1. Clone the repo.

  2. Cd into the repo.

  3. Currently, you are on your master branch. Now you need to add a file named Your_Name.txt, you should a create a new branch with any name of your choice(could be your name as well), with:

    git branch <branch-name>
    And then, checkout to the branch you created by:

    git checkout <branch-name> This brings you to your new branch <branch-name>.

  4. Now, open up your text editor, create a file named Your_Name.txt.In the file, you should add your name in the first line, and your email-id in the second line. When you have made the changes, commit.

    The process of commiting goes like this:

    git status : This shows the status of your files, i.e. it shows which files are present in the staging area and which are not.

    git add <path/to/file> : This adds the selected files to the staging area. To add, all the files to staging area, do git add .

    git commit : On doing this, a text editor opens up and you are asked to enter a commmit message. Commit message should be short (less than 50 characters), and should convey what change you have made. Keep the commit message as meaningful as possible.

  5. You have successfully committed your changes. You can then push these changes to your remote repository by : git push origin <branch-name>.
    Note that all these changes took place in your created branch <branch-name> , and you can delete whatever changes you made by deleting the branch. The above command pushed youur code online to your github repository.

  6. Go to github's online repository and you can see an option of Compare and Pull request against your recently pushed branches. Make a Pull request by entering a short meaningful message and a meaningful comment about what your pull request does.

sandbox's People

Contributors

nitinkgp23 avatar pranitbauva1997 avatar parth-vader avatar sameerchoubey avatar lucky59582 avatar divyanshiverma28 avatar sangamcse avatar amanbansal123 avatar b160131 avatar reshab-b160086 avatar amanydv20 avatar supsamban avatar mohitdmathur avatar ashwanikd0123 avatar sharmasrishti avatar aquilll avatar defcon-007 avatar orkohunter avatar kismatpradhan avatar merajahmad avatar mithunnitskm avatar iron-maiden-666 avatar ritikeshgupta avatar rupeshchy784 avatar shobhamrj avatar tshiteej avatar anshu0201 avatar bandana12345 avatar deepakprasad1243 avatar gauravnit 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.