Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need help understanding how to use Stash / Git


I'm new to Stash, Git, and have limited experience with source code control. I installed Stash and Git on a server. I was able to add a Git repository for one of my existing projects, then clone that repository to Stash. So I think everything's working right, I'm just having a little trouble understanding conceptually how I should use everything. Right now I have a ton of source code with no control.

For example, if I want to work on one of my projects on my pc, and I've created a repository on my source code on the network, do I clone it to my pc, then clone it back to the network when I'm done, then clone it to Stash? Or should the entire repository be just in Stash, then I would clone it to my pc and back to Stash when I'm done?

I don't have a great understanding of how to use Git yet, but I wanted to have a more high level understanding of what I should be doing first. The existing documentation that I've found doesn't really answer what I'm looking for. Can anyone point me in the right direction or give me some ideas?



1 answer

1 accepted

3 votes
Answer accepted

You've asked a big question for sure :) I think you're primary goal initially should just be to get comfortable using source control and not worry to much about Stash

Git is a bit of a beast to learn especially if you have never used source control (Although I guess it could be argued that it may help to come in with a new perspective )

In terms of 'cloning' though

Git is a DVCS (Distributed Version Control System) so technically there is no 'master' repository except that which you yourself view as master as a convention. In this case, this would be Stash

Whenever you 'clone' a git repository you will end up with a FULL repository including ALL history. So when you clone from stash to your dev machine, you now have a full repository on your machine. If e.g., you have a build server, it too will end up with a full copy (there are ways to limit this but not important here)

In everyday work you will have first cloned to your dev machine (that's it, you don't clone again)

Then you make mods during the day and 'commit' those changes back to your local dev repository. You can keep working, commit, work, commit and then at some suitable time - 'push' those changes back to the Stash git repository. This means now that any other people working on the same project can 'pull' from Stash and get your changes.

But you need to get comfortable using git. You could even just use git to commit locally and never push, but just get used to using git's commands to commit, rollback, view history etc..

Maybe start searching google for git howtos as well -

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Team Playbook

Atlympic Event: Team Playbook

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

65 views 0 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you