How to list files in specific revision in `git`?
git ls-tree -r –name-only $REV for example git ls-tree -r –name-only a27689bf7f46dc0735c5b3b6076010c87224063e
git ls-tree -r –name-only $REV for example git ls-tree -r –name-only a27689bf7f46dc0735c5b3b6076010c87224063e
Git makes it hard to lose work. Run: git reflog Than look for the commit that was just before the rebase Then check it out git checkout <sha> Look around, is it the version you wanted to recover? If so, create a branch here git checkout -b mybranch
According to the version control icon documentation, it indicates files that have been excluded from version control, for example in the .gitingore file. However, in my case with Visual Studio Community 2015 Update 2, those icons also show up when I create a new project. Even if none of the created files are explicitly ignored … Read more
It doesn’t track them. That’s the beauty of it. Git only records snapshots of the entire project tree: here’s what all files looked like before the commit and here’s how they look like after. How we got from here to there, Git doesn’t care. This allows intelligent tools to be written after a commit has … Read more
mygithub/master is a remote branch. To create a local branch based off of that remote branch, you have to use git checkout -b mymaster mygithub/master. Git tries to make this easy for you: if you write git checkout branchname, and branchname only exists in a remote, but not locally, Git will automatically set up a … Read more
Based on the docs you have to use a special property, project.scm.id, to define the id of the appropriate server entry in your settings.xml file. <properties> <project.scm.id>my-scm-server</project.scm.id> </properties> And the following in your settings.xml file: <settings> <servers> <server> <id>my-scm-server</id> <username>myUser</username> <password>myPassword</password> </server> </servers> </settings> BTW: Check if you are using the most recent version of … Read more
Create an SSH key instead and use it as a default login method for you git repo. You can follow this link to create an ssh key for authentication on your machine: Generating a new SSH key and adding it to the ssh-agent And then use this to default your login method to use ssh … Read more
The show sub-command, in the end, invokes git diff with whatever flags you have set, or –stat if you did not set any, so simply git stash show –name-only, which runs git diff –name-only between the base commit and the work-tree commit. (See here and here for a description of what I have taken to … Read more
I would recommend using tags (tag tutorial) From your master branch since you are done v1.0 add a tag called v1.0. git tag -a v1.0 -m “Tagging release 1.0” This way you can always come back to a specific version at any time by calling git checkout [tag_name] Another common practice is to use branches … Read more