Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

40%
+0 −1
Q&A Is it a good idea to have a permanent branch for a feature?

You may know me so I am answering :P (someone close to you but you can't find me directly). Is it a good idea to have a permanent branch for a feature? Suppose, you have a permanent branch th...

posted 3y ago by Anonymous‭

Answer
#1: Initial revision by user avatar Anonymous‭ · 2021-09-07T06:35:32Z (about 3 years ago)
You may know me so I am answering :P (someone close to you but you can't find me directly).

>Is it a good idea to have a permanent branch for a feature? 

Suppose, you have a permanent branch then you had PR 1 years later. Of course, there will be lots of changes in develop branch. But, you forgot to merge them in your branch. Suppose, in that PR you had made changes to line 10 page B. But, in develop branch they had deleted those lines and, they don't need those things anymore. So, your PR is useless. But, if go to merge develop to your branch then your PR then your code will be lost either. 

Making the time more shorter : Now, you are going to PR 5 days later. Suppose, the following code was looking like this in your branch.

```java
if(a<b){
   System.out.println(b+" is greater than "+a);
}
```

You had commited that [^1]
```java
if(a<b){
   System.out.println(a+" is less than "+b);
}
```

But, in develop staffs had already done that. Or, removed SOUT and added something else. If you go to merge then your commit will be lost. 

If you just commit in page A and, other developers don't touch that page than you can permanently use a branch rather than creating new ones. Cause, it won't affect much more. Most of your commit was on Codegolf.js so, if you want you can use a permanent branch. But, if you want to work on other files then you can use "temporarily" branch.

[^1]: I know both context represent same thing. I am just giving an example.