The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I've worked with Git for years and never amended anything.
I don't get the issue with reverting.
How would you solve that using TFSC or SVN?
The fact is you pushed something that didn't work to the master branch, people made other changes to that code and now you want it removed.
I've been in the situation where I had to revert multiple commits and this was as easy as selecting the commit I wanted to go back to and selecting "revert to this commit".
As the author says, all backward changes were added to the branch, but my coworkers had some merge conflicts.
Those conflicts are to be expected since I just messed up the whole code base that everyone was working on.
SVN or any other SCM isn't going to handle that gracefully either...
Actually, I don't recognize anything he talks about in that post, except this little sentence in the intro:
János Kubisch wrote:
Fortunately, it is really hard to irrevocably mess something up with git, as long as you have the .git hidden folder in your project intact!
In my experience it takes some getting used to.
I worked in a team who worked with SVN for years and they were also a bunch of bunglers, so they complained about Git for years and never got the hang of it.
Another team who moved to Git was amazed at how easy the transition was.
At first, I thought it was overly complicated compared to SVN, but now I never want to go back.
It's very easy to branch and merge, which makes developing new features and cooperating in teams so much easier.
I wouldn't dismiss Git based on that one article...
Just be sure to get some GUI tool.
Not the default or the command line, those are for script kiddies who think they're so cool because they use command line.
I use SourceTree or Visual Studio 2019 and those work well.
it sometimes tries to push my entire Projects folder
Do you have a .gitignore?
I've never used it before because I was missing stashing functionality.
I used to like SourceTree A LOT better (VS 2015-2017), but with 2019 it's just slightly better I think.
I have a solution with some projects in the same base folder, and other projects that are shared in different locations. When I right-click the solution and choose "Add To Source Control", a Git message pops up:
Source Control - Git
The current solution has projects that are located outside the solution folder. These projects will not be source controlled in the Git repository. To add all the projects to a single Git repository please consolidate all projects under a single folder.
You know we use it, we're 10 developers, we all have multiple branches running in parallel, we have many version tags.
We have a simple workflow
In 4,5 years, I think we had one major issue (no data loss), I think it was because we busted the 1 gig repository size and needed to move files to the LFS system and rebuild the history.
From what I can see, your problem seems to be related to the GIT in Visual Studio; I've seen some solution on StackOverflow; maybe not exactly like your situation, but it should be a good way to start looking at it.
Maybe you could try an external GIT tool (tortoiseGIT, Kraken.... ) and see how it goes.
Keep in mind that Git is a service. It is not solely supplied or hosted by Microsoft. They just own GitHub but there are also other sites that host Git servers. At work we use Bitbucket and they host both Git and Mercurial repositories. They also have both free and commercial accounts available. That's the only one I am somewhat familiar with and there are several others.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
I used to hate GIT, but that was when I had to use the command line, which is incomprehensible. I now use SmartGit as the front end, and I'm quite pleased with the ease of creating branches, stashing stuff away to be applied later, merging branches, etc. I've never had a problem with it, and SmartGit's graph of branches is probably one of the more readable ones I've seen, not that I ever even look at those things when working solo on a project.
Sorry ahead of time if just want some alternative.
Are the fears you have with GIT from personal experience of what you have read and been told?
My history: 4 years in software, some SVN used. Start using GIT on new project. 2 years go by with very little issue of a team of 3 people.
Get a new hire and in the first week things start breaking. Release went out which replaced a fix and compile time issues.
Cause: new hire was using command line to do all their GIT commits/pulls/push/sync.
Me just let them do their thing.
Another week, I cannot help them, because my command line experience of GIT is minimal.
This person claimed years of experience with GIT and blaming the team for doing it wrong, that their way was right.
Also did not help that they decided to rewrite much of the existing code in their style without checking if this was acceptable or what the requirements of those existing components were.
to end this rant: GIT is a tool.
First understand your CURRENT workflow.
How many people in the team?
Then look at a tool to help improve YOUR workflow.
I still look at unit tests with some detain, but when the that work helps show red days before release, it helps.
Simplest work flow: setup VSTS (azure devops) with Master as Pull Request only.
Make branch per feature.
Pull request viewer in devops, pull requests in general, consolidates multiple commits for easy pear review.
Mark delete branch on successful pull.
Issues with conflicts means in VS to sync YOUR master copy.
Merge master into the branch.
The pull-request is updated and conflict removed, to allow for another review.
Im now in a team of 5 people, who have 20+ projects in Azure DevOps, some with multiple repos in them.
Last Visit: 24-Feb-20 5:41 Last Update: 24-Feb-20 5:41