Questions tagged as 'commit'

3
answers

How to return the project to a specific commit?

Assuming a condition where, I have a project with 20 commits, and I decide for unexplained reasons to return some commits independently if I want to go back 4, 5 or 10, assuming the description of my commits are clear, I view my last commits usi...
asked by 06.06.2014 / 04:15
3
answers

How do I see which commits change a certain file?

I've implemented a new functionality for my program in a Func1.cpp file, in the Func1 branch. Then I created one more functionality - in the file Func2.cpp -, but I forgot to create in a separate branch Func2 . Now I'd like to sep...
asked by 12.12.2013 / 02:44
2
answers

What would be best practices for commits in Git?

Are there best practices for committing commits and writing comments in these commits , for better communication and understanding during the software development process?     
asked by 30.04.2015 / 02:17
3
answers

What is the appropriate amount of changes to commit?

I've noticed that in many public projects in GitHub , commits usually contain very minor changes. There are several instances of commits with changes to a single line of code. In others, there are changes only in comments, not in code. I...
asked by 29.05.2014 / 13:53
1
answer

How to commit only one piece of a file in Git?

When modifying multiple parts of a file, is it possible to commit only one piece (for example, a new function)?     
asked by 11.02.2015 / 21:30
2
answers

Add new file to commit

How do I add new files to a commit already done in Git, without creating a new commit? If you've already pushed the remote server, such as "re-committing"?     
asked by 06.03.2015 / 19:36
3
answers

Difference from: "git commit -am" and "-m"

What would be the difference between typing: git commit -m "Teste" and git commit -am "Teste" ? I'm learning about Git and would like to know how to differentiate it.     
asked by 21.11.2018 / 19:59
2
answers

Edit local files without committing

In a project there are some files that need editing to run the local server, such as .htaccess , config.php , among others. In branch master , we keep these files with the data in production. There are some developers who ha...
asked by 05.05.2015 / 21:43
1
answer

The 'git push' command is not working after removing a commit

I needed to roll back a commit and locally it works fine. Now when I give PUSH to my repository, it gives me error. My attempt git fetch origin c6f1668e2fac57401a99a2184a47f0b58c15e403 git reset --hard FETCH_HEAD git add . git commit -m "re...
asked by 26.01.2018 / 17:26
1
answer

Is it possible to keep a branch with pending changes in Git?

Imagine that I have in the master branch a commit of a texte.txt file. So I create a branch called teste2 , I checkout it and create a file called teste2.txt , but I do not commit it. If I give git checkout master an...
asked by 29.07.2014 / 13:08