Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused? #1

Closed
azizamohamedabdelsalam opened this issue Feb 7, 2021 · 6 comments
Labels

Comments

@azizamohamedabdelsalam
Copy link

azizamohamedabdelsalam commented Feb 7, 2021

While you described the hierarchy of commits and relations between them my question is Should l have a reference to my commits,?
So I could roll back to it if I do a lot of works and get confused.

@azizamohamedabdelsalam azizamohamedabdelsalam changed the title Good Day Eng.Mohamed , while you described the hirarechy of commits and relations between them Good Day Eng.Mohamed , while you described the hirarechy of commits and relations between them my question is shall i have a reference so i could rollback to it if i do alot of works and get confused Feb 7, 2021
@AhmedYousseff
Copy link

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

@azizamohamedabdelsalam
Copy link
Author

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

@MohamedRadwan-DevOps
Copy link
Owner

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

@MohamedRadwan-DevOps
Copy link
Owner

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

@MohamedRadwan-DevOps
Copy link
Owner

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

@MohamedRadwan-DevOps
Copy link
Owner

MohamedRadwan-DevOps commented Feb 19, 2021

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.

@MohamedRadwan-DevOps MohamedRadwan-DevOps changed the title Good Day Eng.Mohamed , while you described the hirarechy of commits and relations between them my question is shall i have a reference so i could rollback to it if i do alot of works and get confused Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused Mar 18, 2021
@MohamedRadwan-DevOps MohamedRadwan-DevOps changed the title Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused Should l have a reference to my commits, so I could rollback to it if i do a lot of works and get confused? Mar 18, 2021
MohamedRadwan-DevOps pushed a commit that referenced this issue Apr 4, 2022
Create Add My Review course DevOps
ShereenS referenced this issue in ShereenS/devops-step-by-step Sep 15, 2023
Edit news after the July meetup (#1) and before the October meetup (#2)
MohamedRadwan-DevOps pushed a commit that referenced this issue Sep 15, 2023
Edit news after the July meetup (#1) and before the October meetup (#2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants