Coder Social home page Coder Social logo

Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused? about devops-step-by-step HOT 6 CLOSED

mohamedradwan-devops avatar mohamedradwan-devops commented on August 22, 2024
Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused?

from devops-step-by-step.

Comments (6)

AhmedYousseff avatar AhmedYousseff commented on August 22, 2024 8

Hello Aziza Mohamed; if I may answer your question.
commit is a complete history of you application in specific time, so commit itself is a reference you could rollback to it at

        **DO NOT FORGET COMMIT ARE FOR FREE YOU CAN CREATE AS MUCH AS YOU LIKE** 

if you have a ticket that required a lot of work divide this ticket int multiple sub-ticket each sub-ticket is related to specific topic or problem, and after you finish this sub-ticket commit the benefit of doing
1 - you will not get confused
2- you will not have to rewrite a lot of code
one more thing git provide so many tools to use such as stashing, (detached HEAD could be useful in such scenario)
one more thing git reset is a destructive tool u should be aware of what it's doing to your area and to your repository

from devops-step-by-step.

MohamedRadwan-DevOps avatar MohamedRadwan-DevOps commented on August 22, 2024 1

To answer this question, the answer is no, you should not do that, good comment for your commit should be enough.
Usually, you create this reference using tags, see how to do that in 2nd session by clicking here, also while I don't recommend creating tags without a major change like version but you still can do that in your feature branch and delete them before merging your branch to the master.

from devops-step-by-step.

azizamohamedabdelsalam avatar azizamohamedabdelsalam commented on August 22, 2024

Hello Aziza Mohamed; if I may answer your question.
commit is a complete history of you application in specific time, so commit itself is a reference you could rollback to it at

        **DO NOT FORGET COMMIT ARE FOR FREE YOU CAN CREATE AS MUCH AS YOU LIKE** 

if you have a ticket that required a lot of work divide this ticket int multiple sub-ticket each sub-ticket is related to specific topic or problem, and after you finish this sub-ticket commit the benefit of doing
1 - you will not get confused
2- you will not have to rewrite a lot of code
one more thing git provide so many tools to use such as stashing, (detached HEAD could be useful in such scenario)
one more thing git reset is a destructive tool u should be aware of what it's doing to your area and to your repository

Thank you , got it

from devops-step-by-step.

MohamedRadwan-DevOps avatar MohamedRadwan-DevOps commented on August 22, 2024

@AhmedYousseff Thank you for your effort in answering this question, I do appreciate it!

from devops-step-by-step.

MohamedRadwan-DevOps avatar MohamedRadwan-DevOps commented on August 22, 2024

@azizamohamedabdelsalam:
I have explained in the 2nd session the guidelines for questions or issues, please edit this issue and update it accordingly.

from devops-step-by-step.

MohamedRadwan-DevOps avatar MohamedRadwan-DevOps commented on August 22, 2024

@azizamohamedabdelsalam another point, you can review the guidelines here #2

from devops-step-by-step.

Related Issues (20)

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.